Closed
Bug 1783915
Opened 3 years ago
Closed 2 years ago
ShadowRealm wrapped functions don't correctly toString.
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
107 Branch
Tracking | Status | |
---|---|---|
firefox107 | --- | fixed |
People
(Reporter: mgaudet, Assigned: mgaudet)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
sr = new ShadowRealm();
p = sr.evaluate(`var resolve;
new Promise((r,_) => { resolve = r;}).then(
(r) => { console.log("Resolved with"); }
); resolve`)
Produces TypeError: Function.prototype.toString called on incompatible object
in SpiderMonkey, but works correctly in Safari Technology Preview.
Assignee | ||
Updated•3 years ago
|
Severity: -- → S3
Type: task → defect
Priority: -- → P3
Assignee | ||
Comment 1•3 years ago
|
||
Interesting, it's actually the shell complaining while trying to print p
that's the issue here.
Assignee | ||
Updated•3 years ago
|
Summary: Broken ShadowRealm callable return checking → ShadowRealm wrapped functions don't correctly toString.
Assignee | ||
Comment 2•3 years ago
|
||
Minimal example: new ShadowRealm().evaluate("function f() { }; f").toString()
;
Assignee | ||
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Assignee: nobody → mgaudet
Status: NEW → ASSIGNED
Pushed by mgaudet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/87213cd29f42
Provide a ToStringOp for WrappedFunctionObjects to avoid JSFunction brand-check exception r=bthrall
Comment 5•2 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox107:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•