Closed
Bug 986757
Opened 11 years ago
Closed 11 years ago
JS modules loaded while the add-on debugger is open won't show up
Categories
(DevTools :: Debugger, defect)
DevTools
Debugger
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 31
People
(Reporter: mossop, Assigned: mossop)
References
Details
Attachments
(1 file)
2.05 KB,
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
Because we don't set the __URI__ object before we fire the onNewGlobal event.
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Comment 1•11 years ago
|
||
In bug 986639 we want to be able to detect JSM globals created by add-ons. The easiest way to do that for now is to check the __URI__ property that we set on all such globals and tie that back to the add-on. We know it isn't perfect but it's simple and works for 99% of the cases for now.
The problem is that since we call JS_FireOnNewGlobal before setting the __URI__ property we'll miss new globals created after the debugger is opened. This patch defers calling that until after the property is set. Bug 986639 will have a patch verifying that that works. We only do this for the case where we aren't reusing globals for modules since in that case the global doesn't have the __URI__ property itself and at least right now we don't care about b2g for extension debugging.
Attachment #8395834 -
Flags: review?(bobbyholley)
Comment 2•11 years ago
|
||
Comment on attachment 8395834 [details] [diff] [review]
patch rev 1
Review of attachment 8395834 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with comments addressed.
(In reply to Dave Townsend (:Mossop) from comment #1)
> We only do this for the
> case where we aren't reusing globals for modules since in that case the
> global doesn't have the __URI__ property itself and at least right now we
> don't care about b2g for extension debugging.
Is there any reason not to do it the same way in both places though? I'd prefer consistent behavior here, even if it means having bool createdNewGlobal = false (and setting it to true in the |if (!mLoaderGlobal)| case). We'll end up with the same number of locals anyway, because we can remove |flags| and just inline the bit.
::: js/xpconnect/loader/mozJSComponentLoader.cpp
@@ +659,4 @@
> rv = xpc->InitClassesWithNewWrappedGlobal(aCx,
> static_cast<nsIGlobalObject *>(backstagePass),
> mSystemPrincipal,
> + flags,
Please include the useful parts of comment 1 as a comment here, explaining why we defer OnNewGlobalObject.
Attachment #8395834 -
Flags: review?(bobbyholley) → review+
Assignee | ||
Comment 3•11 years ago
|
||
Comment 4•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 31
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•