Closed
Bug 872135
Opened 13 years ago
Closed 13 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•13 years ago
|
||
| Assignee | ||
Comment 2•13 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•13 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•13 years ago
|
||
+ if (!JS_SetDebugModeForAllCompartments(unpushedCx, gDesiredDebugMode))
goto fail;
{}
Comment 5•13 years ago
|
||
XPConnect uses JS style which doesn't always require braces.
Comment 6•13 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•13 years ago
|
||
Comment 8•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Comment 9•13 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•13 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
Comment 11•13 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•