Closed
Bug 940718
Opened 11 years ago
Closed 11 years ago
Mark AutoJSContext as not GCing (and make this true)
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: terrence, Assigned: terrence)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file)
(deleted),
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
We still have a few (false positive) hazards over AutoJSContext. I think the best thing to do here is to run a first GetSafeJSContext in nsContentUtils::Init -- where it is safe to GC -- so that we don't have to worry about a potential GC later.
Lets see if this theory works in practice:
https://tbpl.mozilla.org/?tree=Try&rev=20aedee8483e
Comment 1•11 years ago
|
||
Bobby, does this sound like a reasonable plan?
Flags: needinfo?(bobbyholley+bmo)
Comment 2•11 years ago
|
||
Rather than doing any hacky fixes to the static analysis, I would prefer an explicit separate call to InitSafeJSContext, and have GetSafeJSContext MOZ_ASSERT that mSafeJSContext is non-null.
In a perfect would, InitSafeJSContext would happen during XPConnect startup. But this is what used to happen, and caused a bunch of startup ordering pain (which I fixed in bug 905364). So I think just doing it from nsContentUtils is fine, given that JSContexts are on the way out anyway.
Flags: needinfo?(bobbyholley+bmo)
Assignee | ||
Comment 3•11 years ago
|
||
Great idea, calling it InitSafeJSContext: I'll make that split tomorrow. Try run looks good, modulo existing bustage on tip.
Assignee | ||
Comment 4•11 years ago
|
||
Not bad at all.
Attachment #8335382 -
Flags: review?(bobbyholley+bmo)
Updated•11 years ago
|
Attachment #8335382 -
Flags: review?(bobbyholley+bmo) → review+
Assignee | ||
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•11 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•