Closed
Bug 1198352
Opened 9 years ago
Closed 9 years ago
WeakSet methods are missing CallNonGenericMethod
Categories
(Core :: JavaScript: Standard Library, defect)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla44
People
(Reporter: anba, Assigned: evilpie)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
5.41 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
Test case: --- newGlobal().WeakSet.prototype.add.call(new WeakSet, {}); --- Expected: No error Actual: "TypeError: WeakSet.prototype.add called on incompatible object"
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → evilpies
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8676409 -
Flags: review?(jwalden+bmo)
Assignee | ||
Updated•9 years ago
|
Attachment #8676409 -
Flags: review?(jwalden+bmo) → review?(till)
Comment 2•9 years ago
|
||
Comment on attachment 8676409 [details] [diff] [review] Handle cross-compartment WeakSets Review of attachment 8676409 [details] [diff] [review]: ----------------------------------------------------------------- Stealing back because I can't type well and so should do less-typy things. ::: js/src/builtin/WeakSet.js @@ +6,5 @@ > function WeakSet_add(value) { > // Steps 1-3. > var S = this; > if (!IsObject(S) || !IsWeakSet(S)) > + return callFunction(CallWeakSetMethodIfWrapped, this, value, "WeakSet_add"); If memory serves and the last string goes into user-visible error messages, make this "WeakSet.prototype.add", and so on for the others. The "_" name is internal, shouldn't be mentioned.
Attachment #8676409 -
Flags: review?(till) → review+
Assignee | ||
Comment 3•9 years ago
|
||
Comment on attachment 8676409 [details] [diff] [review] Handle cross-compartment WeakSets Review of attachment 8676409 [details] [diff] [review]: ----------------------------------------------------------------- I am not going to complain about a quick review :) ::: js/src/builtin/WeakSet.js @@ +6,5 @@ > function WeakSet_add(value) { > // Steps 1-3. > var S = this; > if (!IsObject(S) || !IsWeakSet(S)) > + return callFunction(CallWeakSetMethodIfWrapped, this, value, "WeakSet_add"); This is actually how CallWeakSetMethodIfWrapped knows what to invoke.
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/dc1467aff5e4
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•