Closed
Bug 628930
Opened 13 years ago
Closed 13 years ago
JSAutoRequest in Handle::ToJSObject is not necessary
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: gal, Assigned: gal)
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
685 bytes,
patch
|
jst
:
review+
jst
:
approval2.0+
|
Details | Diff | Splinter Review |
I audited all uses of AutoRequest in jetpack to see whether we have a valid compartment everywhere. Handle::ToJSObject is called from the following places: 2 calls in JetpackActorCommon, both are in the variant2jsval code. That code can only be called after we have selected a valid compartment (since it allocates objects), so we are also in a request for sure. From JetpackChild::CreateHandle. This function does JS_ReportError before calling to Handle::toJSObject, that would assert if we didn't have a request pending already prio to calling ToJSObject. From JetpackParent::Createhandle, which enters a compartment immediately prior to calling toJSObject, and also a request. Entering a request in ToJSObject is hence redundant. I am removing it because it doesn't enter a compartment at the same time, which would be an error if we ever entered without a request and a compartment already selected (we do not).
Assignee | ||
Comment 1•13 years ago
|
||
Assignee: general → gal
Assignee | ||
Updated•13 years ago
|
Attachment #507069 -
Flags: review?(jst)
Assignee | ||
Comment 2•13 years ago
|
||
No difference running all jetpack tests.
Updated•13 years ago
|
Attachment #507069 -
Flags: review?(jst)
Attachment #507069 -
Flags: review+
Attachment #507069 -
Flags: approval2.0+
Assignee | ||
Comment 3•13 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/b0ae8b5a88a0
Whiteboard: fixed-in-tracemonkey
Comment 4•13 years ago
|
||
cdleary-bot mozilla-central merge info: http://hg.mozilla.org/mozilla-central/rev/b0ae8b5a88a0
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•