mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1828230 - Fix GCC -Wuninitialized warning for js/public/CallArgs.h r=jseward
Differential Revision: https://phabricator.services.mozilla.com/D175541
This commit is contained in:
parent
5379509f30
commit
3e9158b6b7
@ -94,7 +94,7 @@ extern JS_PUBLIC_API void CheckIsValidConstructible(const Value& v);
|
||||
#endif
|
||||
|
||||
class MOZ_STACK_CLASS IncludeUsedRval {
|
||||
mutable bool usedRval_;
|
||||
mutable bool usedRval_ = false;
|
||||
|
||||
public:
|
||||
bool usedRval() const { return usedRval_; }
|
||||
@ -118,8 +118,8 @@ class MOZ_STACK_CLASS CallArgsBase {
|
||||
"WantUsedRval can only be IncludeUsedRval or NoUsedRval");
|
||||
|
||||
protected:
|
||||
Value* argv_;
|
||||
unsigned argc_;
|
||||
Value* argv_ = nullptr;
|
||||
unsigned argc_ = 0;
|
||||
bool constructing_ : 1;
|
||||
|
||||
// True if the caller does not use the return value.
|
||||
@ -138,6 +138,8 @@ class MOZ_STACK_CLASS CallArgsBase {
|
||||
void assertUnusedRval() const {}
|
||||
#endif
|
||||
|
||||
CallArgsBase() : constructing_(false), ignoresReturnValue_(false) {}
|
||||
|
||||
public:
|
||||
// CALLEE ACCESS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user