Closed
Bug 1466112
Opened 7 years ago
Closed 7 years ago
Make sure obj->global() and obj->realm() are not called on wrappers
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: jandem, Unassigned)
References
Details
Wrappers are shared by all realms in their compartment, so asking a wrapper for its global/realm is kind of meaningless.
What we should do is:
(1) Define NativeObject::{global,realm} methods. Native objects are never wrappers so hopefully this will eliminate a good number of JSObject::{global,realm} calls.
(2) Remove JSObject::{global,realm} and replace them with either nonWrapper{Global,Realm} (with appropriate asserts) or maybeWrapper{Global,Realm}. (Same thing for ObjectGroup::realm...)
(3) This audit will also affect JSAutoRealm and various other APIs. Initially we can put these in the maybeWrapper bucket and then audit them in follow-up bugs.
| Reporter | ||
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•