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)

defect
Not set
normal

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.
Depends on: 1032869
Attachment #8483870 - Attachment is obsolete: true
Attachment #8483870 - Flags: review?(jimb)
Attachment #8483889 - Flags: review?(jimb)
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+
This should be ready to land, right?
Oh, it's blocked by bug 1032869. Gotcha.
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?
(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: 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.

Attachment

General

Created:
Updated:
Size: