Closed
Bug 1062629
Opened 10 years ago
Closed 10 years ago
[jsdbg2] Off-thread parsing always parses in a non-debug mode compartment
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: shu, Assigned: shu)
References
Details
Attachments
(1 file, 1 obsolete file)
The off-thread parse task compartment is always non-debug, even when the main thread compartment is in debug mode.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8483870 -
Flags: review?(jimb)
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8483870 -
Attachment is obsolete: true
Attachment #8483870 -
Flags: review?(jimb)
Attachment #8483889 -
Flags: review?(jimb)
Comment 3•10 years ago
|
||
Comment on attachment 8483889 [details] [diff] [review]
Off-thread compartment debug mode should match main thread compartment debug mode.
Review of attachment 8483889 [details] [diff] [review]:
-----------------------------------------------------------------
I think this also needs a comment on JSCompartment::debugMode itself. Is this going to be simplified when debug mode doesn't inhibit optimizations, or complicated?
Attachment #8483889 -
Flags: review?(jimb) → review+
Comment 4•10 years ago
|
||
This should be ready to land, right?
Comment 5•10 years ago
|
||
Oh, it's blocked by bug 1032869. Gotcha.
Comment 6•10 years ago
|
||
Comment on attachment 8483889 [details] [diff] [review]
Off-thread compartment debug mode should match main thread compartment debug mode.
Review of attachment 8483889 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jscompartment.cpp
@@ +596,5 @@
>
> if (global_ && IsObjectAboutToBeFinalized(global_.unsafeGet())) {
> + // For main thread compartments, the invariant is that debug mode
> + // implies having at least one Debugger still attached. However, for
> + // off-thread compartments (which are used in off-thread parsing,
This opening parenthesis is never closed.
Instead of this weird debugMode() and invisibility thing (which looks *weird*), why not just check global->getDebuggers().length? Isn't that exactly the condition we need?
Assignee | ||
Comment 7•10 years ago
|
||
(In reply to Jim Blandy :jimb from comment #6)
> Comment on attachment 8483889 [details] [diff] [review]
> Off-thread compartment debug mode should match main thread compartment debug
> mode.
>
> Review of attachment 8483889 [details] [diff] [review]:
> -----------------------------------------------------------------
>
>
> Instead of this weird debugMode() and invisibility thing (which looks
> *weird*), why not just check global->getDebuggers().length? Isn't that
> exactly the condition we need?
That's the bug: the off-thread compartment has its own global, and has no Debuggers, even though it's doing work on behalf of the main-thread compartment, which does have Debuggers.
Assignee | ||
Comment 8•10 years ago
|
||
![]() |
||
Comment 9•10 years ago
|
||
Assignee: nobody → shu
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in
before you can comment on or make changes to this bug.
Description
•