Closed
Bug 738480
Opened 13 years ago
Closed 13 years ago
Debugger.prototype.findScripts does not find non-compileAndGo scripts
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: jorendorff, Assigned: jimb)
References
Details
(Whiteboard: [chrome-debug])
Attachments
(1 file, 1 obsolete file)
9.78 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
It does not find them because the current code searches for scripts with the right global. I think compartment-per-global will clear this right up.
Assignee | ||
Comment 1•13 years ago
|
||
Adding [chrome-debug] to whiteboard; although this isn't chrome-specific, chrome debugging does need it.
The patch we whipped up is part of changeset ff20735ac16c in the remote-debug repository.
Whiteboard: [chrome-debug]
Reporter | ||
Updated•13 years ago
|
Assignee: general → jorendorff
Reporter | ||
Comment 2•13 years ago
|
||
Attachment #626422 -
Flags: review?(jimb)
Assignee | ||
Comment 4•13 years ago
|
||
Comment on attachment 626422 [details] [diff] [review]
v1
Review of attachment 626422 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/vm/Debugger.cpp
@@ +2187,5 @@
> * if no error occurs, false if an error occurs.
> */
> + bool consider(JSScript *script, AutoScriptVector *vector) {
> + GlobalObject *global = script->getGlobalObjectOrNull();
> + if (global && !globals.has(global))
Could we have a one-line comment here explaining that non-CNG scripts can't be associated with any global, so we're just including them all?
Attachment #626422 -
Flags: review?(jimb) → review+
Reporter | ||
Comment 5•13 years ago
|
||
I don't have time to write a one-line comment, so I added a three-line comment
https://hg.mozilla.org/integration/mozilla-inbound/rev/58ca5bf07352
Comment 6•13 years ago
|
||
Reporter | ||
Comment 7•13 years ago
|
||
I refreshed this and ran it by Try server, but it has some failures in debugger tests.
Assignee | ||
Updated•13 years ago
|
Assignee: jorendorff → nobody
Component: JavaScript Engine → jemalloc
Target Milestone: --- → mozilla14
Version: Other Branch → 15 Branch
Assignee | ||
Comment 8•13 years ago
|
||
This patch was needed to see all the scripts we expected while debugging chrome code; it landed, but bounced. Panos, this might still be affecting our chrome debugging.
The patch includes a test, so we can see for sure.
Assignee: nobody → jimb
Comment 9•13 years ago
|
||
Resetting component & flags that I presume were accidentally changed. This patch seems slightly bitrotted:
Debugger.cpp:2348:40: error: no member named 'getGlobalObjectOrNull' in 'JSScript'
I wanted to verify if this patch would fix some missing scripts I get with chrome debugging.
Component: jemalloc → JavaScript Engine
Target Milestone: mozilla14 → ---
Version: 15 Branch → Trunk
Assignee | ||
Comment 10•13 years ago
|
||
Since compartment-per-global, this code can be much simplified, and fix this bug in the process.
Will request review if try approves.
Attachment #626422 -
Attachment is obsolete: true
Assignee | ||
Comment 11•13 years ago
|
||
Assignee | ||
Comment 12•13 years ago
|
||
Seems to cause a bunch of timeouts in the debugger tests:
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/debugger/test/browser_dbg_bfcache.js | Test timed out
and a bunch like this:
TEST-UNEXPECTED-FAIL | /home/cltbld/talos-slave/test/build/xpcshell/tests/toolkit/devtools/debugger/tests/unit/test_dbgactor.js | test failed (with xpcshell return code: 0), see following log:
TEST-UNEXPECTED-FAIL | chrome://global/content/devtools/dbg-script-actors.js:1056 | TypeError: aScript.url is null - See following stack:
Assignee | ||
Comment 13•13 years ago
|
||
Seems like the debugger wasn't expecting to get any scripts that didn't have URLs; it does now.
Fresh try: https://tbpl.mozilla.org/?tree=Try&rev=d86bf86be673
Comment 14•13 years ago
|
||
(In reply to Panos Astithas [:past] from comment #9)
> I wanted to verify if this patch would fix some missing scripts I get with
> chrome debugging.
It does indeed!
(In reply to Jim Blandy :jimb from comment #13)
> Seems like the debugger wasn't expecting to get any scripts that didn't have
> URLs; it does now.
After we get Debugger.Source and are able to display the script contents without using the URL to fetch them, will it make sense to allow scripts without URLs again? Under what circumstances eval scripts get no URL? Using eval() in a page makes the script inherit the page URL, so I haven't come across this case before.
Blocks: 740551
Assignee | ||
Comment 15•13 years ago
|
||
Still some interesting regressions here; for example:
https://tbpl.mozilla.org/php/getParsedLog.php?id=16149680&tree=Try&full=1
Comment 16•13 years ago
|
||
(In reply to Jim Blandy :jimb from comment #15)
> Still some interesting regressions here; for example:
> https://tbpl.mozilla.org/php/getParsedLog.php?id=16149680&tree=Try&full=1
Only the createRemote leak is new, the others are bug 753225 and bug 797336.
Assignee | ||
Updated•13 years ago
|
Attachment #671586 -
Flags: review?(luke)
Assignee | ||
Comment 17•13 years ago
|
||
Luke, you'll enjoy this patch, I think.
The try run looks good; there is a debugger-related failure, but I think that's a known bug (starred).
Assignee | ||
Comment 18•13 years ago
|
||
Panos, for what it's worth, the stack traces printed after the "###!!! ASSERTION" (NS_ASSERTION) are produced assuming that we've got a frame pointer, which we don't; they're always bogus.
![]() |
||
Comment 19•13 years ago
|
||
Comment on attachment 671586 [details] [diff] [review]
Simplify Debugger::ScriptQuery after CPG. Fix missing compile-and-go scripts.
cpg ftw!
Attachment #671586 -
Flags: review?(luke) → review+
Assignee | ||
Comment 20•13 years ago
|
||
Status: NEW → ASSIGNED
Flags: in-testsuite+
Target Milestone: --- → mozilla19
Comment 21•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•