Closed
Bug 872135
Opened 11 years ago
Closed 11 years ago
Use the SafeJSContext in nsXPConnect::CheckForDebugMode
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: bholley, Assigned: bholley)
References
Details
Attachments
(1 file)
3.01 KB,
patch
|
gkrizsanits
:
review+
|
Details | Diff | Splinter Review |
The stuff it does right now seems pretty darn crazy, and it's not clear to me why it's necessary at all. I'll write a patch and see what try has to say.
Assignee | ||
Comment 1•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=56050477770c
Assignee | ||
Comment 2•11 years ago
|
||
Last patch was infinite recursion fail. This patch passes what limited JSD test coverage we have, so it probably isn't worth pushing to try again. Flagging gabor for review.
Attachment #750781 -
Flags: review?(gkrizsanits)
Comment 3•11 years ago
|
||
Comment on attachment 750781 [details] [diff] [review] Use the SafeJSContext in nsXPConnect::CheckForDebugMode. v2 Review of attachment 750781 [details] [diff] [review]: ----------------------------------------------------------------- - if (!NS_IsMainThread()) { - return; - } + if (!NS_IsMainThread()) + MOZ_CRASH(); missing {}
Attachment #750781 -
Flags: review?(gkrizsanits) → review+
Comment 4•11 years ago
|
||
+ if (!JS_SetDebugModeForAllCompartments(unpushedCx, gDesiredDebugMode)) goto fail; {}
Comment 5•11 years ago
|
||
XPConnect uses JS style which doesn't always require braces.
Comment 6•11 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #5) > XPConnect uses JS style which doesn't always require braces. That's totally true. I would argue that mixing 2 styles in one function is wrong... but I'll let Bobby decide what he prefers.
Assignee | ||
Comment 7•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?changeset=6869a88c9461
Comment 8•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6869a88c9461
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Comment 9•11 years ago
|
||
Comment on attachment 750781 [details] [diff] [review] Use the SafeJSContext in nsXPConnect::CheckForDebugMode. v2 Review of attachment 750781 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/xpconnect/src/nsXPConnect.cpp @@ +21,5 @@ > #include "nsNullPrincipal.h" > #include "nsIURI.h" > #include "nsJSEnvironment.h" > #include "nsThreadUtils.h" > +#include "nsContentUtils.h" Out of interest, why?
Assignee | ||
Comment 10•11 years ago
|
||
(In reply to :Ms2ger from comment #9) > Out of interest, why? Must have been an artifact of the earlier iteration of the patch. Seems to build fine without it. Pushed a fix: https://hg.mozilla.org/integration/mozilla-inbound/rev/cd114424cc86
You need to log in
before you can comment on or make changes to this bug.
Description
•