Closed
Bug 1095145
Opened 11 years ago
Closed 11 years ago
Debugger::onNewScript doesn't need its 'compileAndGoGlobal' argument
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: jimb, Assigned: jimb)
References
Details
Attachments
(1 file, 1 obsolete file)
The 'compileAndGoGlobal' argument to Debugger::onNewScript is redundant, and should be removed.
Looking at the assertions at the top of Debugger::onNewScript:
/* static */ void
Debugger::onNewScript(JSContext *cx, HandleScript script, GlobalObject *compileAndGoGlobal)
{
MOZ_ASSERT_IF(script->compileAndGo(), compileAndGoGlobal);
MOZ_ASSERT_IF(script->compileAndGo(), compileAndGoGlobal == &script->uninlinedGlobal());
...
MOZ_ASSERT_IF(!script->compileAndGo(), !compileAndGoGlobal);
From these it clearly follows that compileAndGoGlobal is always equal to:
script->compileAndGo() ? script->uninlinedGlobal() : nullptr
and hence need not be passed to onNewScript, nor need onNewScript pass it to slowPathOnNewScript.
Assignee | ||
Comment 2•11 years ago
|
||
This takes care of bug 1064079 as well.
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Comment 5•11 years ago
|
||
Yeah, just got dropped. Let me give it a new push...
Flags: needinfo?(jimb)
Assignee | ||
Comment 6•11 years ago
|
||
Patch refreshed, new try push:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=91a0a64c7fdf
Attachment #8554625 -
Flags: review?(shu)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → jimb
Comment 7•11 years ago
|
||
Comment on attachment 8554625 [details] [diff] [review]
Remove compileAndGoGlobal argument to Debugger::onNewScript, and simplify accordingly.
Review of attachment 8554625 [details] [diff] [review]:
-----------------------------------------------------------------
Very nice.
::: js/src/vm/Debugger.cpp
@@ -1312,5 @@
> - for (Debugger **p = src->begin(); p != src->end(); p++) {
> - Debugger *dbg = *p;
> - Value v = ObjectValue(*dbg->toJSObject());
> - if (dbg->observesScript(script) && dbg->observesNewScript() &&
> - (wasEmpty || Find(dest->begin(), dest->end(), v) == dest->end()) &&
I wonder why we ever needed to deduplicate the list of debuggers...
Attachment #8554625 -
Flags: review?(shu) → review+
Assignee | ||
Updated•11 years ago
|
Attachment #8518519 -
Attachment is obsolete: true
Assignee | ||
Comment 8•11 years ago
|
||
I wouldn't call that try push "clean", but nothing there seemed remotely related to this patch.
Assignee | ||
Comment 9•11 years ago
|
||
Flags: in-testsuite-
Target Milestone: --- → mozilla38
Assignee | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Comment 10•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•