зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1132224 - Reword delazification method names and remove stale reference to "debug mode". (r=jimb)
This commit is contained in:
Родитель
7a13d87f08
Коммит
0407dc6d97
|
@ -763,12 +763,12 @@ CreateLazyScriptsForCompartment(JSContext *cx)
|
|||
}
|
||||
|
||||
bool
|
||||
JSCompartment::ensureDelazifyScriptsForDebugMode(JSContext *cx)
|
||||
JSCompartment::ensureDelazifyScriptsForDebugger(JSContext *cx)
|
||||
{
|
||||
MOZ_ASSERT(cx->compartment() == this);
|
||||
if ((debugModeBits & DebugNeedDelazification) && !CreateLazyScriptsForCompartment(cx))
|
||||
if (needsDelazificationForDebugger() && !CreateLazyScriptsForCompartment(cx))
|
||||
return false;
|
||||
debugModeBits &= ~DebugNeedDelazification;
|
||||
debugModeBits &= ~DebugNeedsDelazification;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -319,7 +319,7 @@ struct JSCompartment
|
|||
enum {
|
||||
DebugMode = 1 << 0,
|
||||
DebugObservesAllExecution = 1 << 1,
|
||||
DebugNeedDelazification = 1 << 2
|
||||
DebugNeedsDelazification = 1 << 2
|
||||
};
|
||||
|
||||
// DebugObservesAllExecution is a submode of DebugMode, and is only valid
|
||||
|
@ -470,17 +470,19 @@ struct JSCompartment
|
|||
debugModeBits &= ~DebugObservesAllExecution;
|
||||
}
|
||||
|
||||
bool needsDelazificationForDebugger() const { return debugModeBits & DebugNeedsDelazification; }
|
||||
|
||||
/*
|
||||
* Schedule the compartment to be delazified. Called from
|
||||
* LazyScript::Create.
|
||||
*/
|
||||
void scheduleDelazificationForDebugMode() { debugModeBits |= DebugNeedDelazification; }
|
||||
void scheduleDelazificationForDebugger() { debugModeBits |= DebugNeedsDelazification; }
|
||||
|
||||
/*
|
||||
* If we scheduled delazification for turning on debug mode, delazify all
|
||||
* scripts.
|
||||
*/
|
||||
bool ensureDelazifyScriptsForDebugMode(JSContext *cx);
|
||||
bool ensureDelazifyScriptsForDebugger(JSContext *cx);
|
||||
|
||||
void clearBreakpointsIn(js::FreeOp *fop, js::Debugger *dbg, JS::HandleObject handler);
|
||||
|
||||
|
|
|
@ -3762,7 +3762,7 @@ LazyScript::CreateRaw(ExclusiveContext *cx, HandleFunction fun,
|
|||
if (!res)
|
||||
return nullptr;
|
||||
|
||||
cx->compartment()->scheduleDelazificationForDebugMode();
|
||||
cx->compartment()->scheduleDelazificationForDebugger();
|
||||
|
||||
return new (res) LazyScript(fun, table.forget(), packed, begin, end, lineno, column);
|
||||
}
|
||||
|
|
|
@ -3341,7 +3341,7 @@ class MOZ_STACK_CLASS Debugger::ScriptQuery
|
|||
// All scripts in the debuggee compartment must be visible, so
|
||||
// delazify everything.
|
||||
AutoCompartment ac(cx, comp);
|
||||
if (!comp->ensureDelazifyScriptsForDebugMode(cx))
|
||||
if (!comp->ensureDelazifyScriptsForDebugger(cx))
|
||||
return false;
|
||||
}
|
||||
return compartments.put(comp);
|
||||
|
|
Загрузка…
Ссылка в новой задаче