mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 819509 - Make some JSFunction setters idempotent. r=njn
--HG-- extra : rebase_source : 71dab04f49a84d1d3108d610e33fa7e06a18a143
This commit is contained in:
parent
b43c7084b8
commit
8cbbec8014
@ -113,18 +113,19 @@ struct JSFunction : public JSObject
|
||||
/* Returns the strictness of this function, which must be interpreted. */
|
||||
inline bool inStrictMode() const;
|
||||
|
||||
// Can be called multiple times by the parser.
|
||||
void setArgCount(uint16_t nargs) {
|
||||
JS_ASSERT(this->nargs == 0);
|
||||
JS_ASSERT(this->nargs == 0 || this->nargs == nargs);
|
||||
this->nargs = nargs;
|
||||
}
|
||||
|
||||
// Can be called multiple times by the parser.
|
||||
void setHasRest() {
|
||||
JS_ASSERT(!hasRest());
|
||||
flags |= HAS_REST;
|
||||
}
|
||||
|
||||
// Can be called multiple times by the parser.
|
||||
void setHasDefaults() {
|
||||
JS_ASSERT(!hasDefaults());
|
||||
flags |= HAS_DEFAULTS;
|
||||
}
|
||||
|
||||
@ -147,8 +148,8 @@ struct JSFunction : public JSObject
|
||||
flags |= HEAVYWEIGHT;
|
||||
}
|
||||
|
||||
// Can be called multiple times by the parser.
|
||||
void setIsExprClosure() {
|
||||
JS_ASSERT(!isExprClosure());
|
||||
flags |= EXPR_CLOSURE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user