Closed
Bug 1482215
Opened 6 years ago
Closed 5 years ago
invisibleToDebugger should be a property of compartments, not realms
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla66
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: jimb, Assigned: jimb)
References
Details
Attachments
(1 file, 1 obsolete file)
At the moment, the invisibleToDebugger flag is a property of individual realms, but this is very difficult to work with, as inter-realm edges are very common, meaning that Debugger operations that retrieve almost any value from the debuggee should be fallible. Previously, the invisibleToDebugger flag was associated with compartments, so that only Debugger.Object.prototype.unwrap needed to be fallible in order to enforce it. We should move the flag back to compartments. Fortunately, all uses of JS::RealmCreationOptions::setInvisibleToDebugger also request a fresh compartment, so this should not affect any users of the API.
Updated•6 years ago
|
Priority: -- → P3
Assignee | ||
Comment 1•5 years ago
|
||
jandem says that this should make it possible to remove the last use of JSObject::deprecatedRealm, found in Debugger. I've forgotten some of the details of this patch, but when I rebase it I'll make sure that removal makes sense, and include it in the patch.
See Also: → 1482082
Comment 2•5 years ago
|
||
Please let me know if you can't get to this soon and I can do this.
Flags: needinfo?(jimb)
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=40a5949e94e139215137c54d9af73245f1cdfe6c
Assignee | ||
Updated•5 years ago
|
Assignee: nobody → jimb
Assignee | ||
Comment 6•5 years ago
|
||
The final remaining code that assumes that every object is associated with a global is in the Debugger API: Debugger.Object.prototype.unwrap consults the unwrapped object's global to see whether it is about to reveal an object that it must not. This patch: - adds an `invisibleToDebugger` flag to JS::Compartment, and sets it from the Realm options (since there is no API for creating compartments directly; only the act of creating a Realm can create a compartment to hold it); - asserts that new realms added to a compartment have a compatible visibility; and - has the shell primitive for creating realms throw an error in case of incompatibility, rather than crashing.
Updated•5 years ago
|
Attachment #9031724 -
Attachment is obsolete: true
Updated•5 years ago
|
Attachment #9031590 -
Attachment description: Bug 1482215: Ensure compartments never contain a mix of visible and invisible realms. r?jorendorff → Bug 1482215: Make Debugger visibility per-Compartment, and ensure realms match their compartments.
Updated•5 years ago
|
Attachment #9031590 -
Attachment description: Bug 1482215: Make Debugger visibility per-Compartment, and ensure realms match their compartments. → Bug 1482215: Make Debugger visibility per-Compartment, and ensure realms match their compartments. r?jorendorff
Pushed by jblandy@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7e30c215f294 Make Debugger visibility per-Compartment, and ensure realms match their compartments. r=jorendorff
Assignee | ||
Updated•5 years ago
|
Status: NEW → ASSIGNED
Comment 9•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7e30c215f294
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox66:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in
before you can comment on or make changes to this bug.
Description
•