Closed
Bug 892187
Opened 11 years ago
Closed 3 years ago
Fix spurious uses of ExclusiveContext->asJSContext()
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bhackett1024, Assigned: bhackett1024)
References
Details
(Whiteboard: [leave open])
Attachments
(2 files)
41.52 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
1.60 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
Bug 885758 added a fair number of uses of cx->asJSContext() for ExclusiveContext or ThreadSafeContext. Some of these calls are not justified and would lead to a null crash if they executed with an ExclusiveContext which is not a JSContext. The attached patch goes through all these uses and either adds appropriate checks or restructures the code so that the asJSContext() is not necessary.
Attachment #773663 -
Flags: review?(wmccloskey)
Comment 1•11 years ago
|
||
bhackett, GGC builds are busted on inbound at the moment. This patch fixes it, though I'm not sure if it's the right fix w.r.t. the patch you have in this bug. Either way, if you could fix GGC builds as part of this bug that would be helpful. Thanks.
Updated•11 years ago
|
Assignee: general → n.nethercote
Assignee | ||
Comment 2•11 years ago
|
||
Comment on attachment 774183 [details] [diff] [review] Fix GGC builds. Review of attachment 774183 [details] [diff] [review]: ----------------------------------------------------------------- This looks good, though it's independent from the existing patch in this bug and can land now. Strange, I did a local ggc build before landing 885758 and it worked... ::: js/src/jsobj.cpp @@ +2858,5 @@ > uint32_t oldCount, uint32_t newCount) > { > #ifdef JSGC_GENERATIONAL > if (cx->isJSContext()) { > + return cx->asJSContext()->runtime()-> gcNursery.reallocateElements(cx->asJSContext(), obj, oldHeader, Can you rm the extra space on this line?
Attachment #774183 -
Flags: review+
Assignee | ||
Updated•11 years ago
|
Assignee: n.nethercote → bhackett1024
Comment 3•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ec136828f42a > Can you rm the extra space on this line? Ugh, I forgot to do that. Can you do it in your patch? Thanks.
Whiteboard: [leave open]
Comment 4•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ec136828f42a
Attachment #773663 -
Flags: review?(wmccloskey) → review+
Assignee | ||
Comment 5•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/949582d150c2
Comment 6•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/949582d150c2
Updated•3 years ago
|
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•