зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1013326 - Change js::RunScript to a JS pseudostack entry; r=djvj
This commit is contained in:
Родитель
ba2036ac44
Коммит
00bb3f089f
|
@ -368,7 +368,7 @@ js::RunScript(JSContext *cx, RunState &state)
|
|||
{
|
||||
JS_CHECK_RECURSION(cx, return false);
|
||||
|
||||
SPSEntryMarker marker(cx->runtime());
|
||||
SPSEntryMarker marker(cx->runtime(), state.script());
|
||||
|
||||
state.script()->ensureNonLazyCanonicalFunction(cx);
|
||||
|
||||
|
|
|
@ -318,7 +318,8 @@ SPSProfiler::allocProfileString(JSScript *script, JSFunction *maybeFun)
|
|||
return cstr;
|
||||
}
|
||||
|
||||
SPSEntryMarker::SPSEntryMarker(JSRuntime *rt
|
||||
SPSEntryMarker::SPSEntryMarker(JSRuntime *rt,
|
||||
JSScript *script
|
||||
MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
|
||||
: profiler(&rt->spsProfiler)
|
||||
{
|
||||
|
@ -328,8 +329,9 @@ SPSEntryMarker::SPSEntryMarker(JSRuntime *rt
|
|||
return;
|
||||
}
|
||||
size_before = *profiler->size_;
|
||||
profiler->push("js::RunScript", this, nullptr, nullptr, /* copy = */ false);
|
||||
profiler->push("js::RunScript", nullptr, script, script->code(), /* copy = */ false);
|
||||
}
|
||||
|
||||
SPSEntryMarker::~SPSEntryMarker()
|
||||
{
|
||||
if (profiler != nullptr) {
|
||||
|
|
|
@ -246,8 +246,9 @@ SPSProfiler::stringsReset()
|
|||
class SPSEntryMarker
|
||||
{
|
||||
public:
|
||||
explicit SPSEntryMarker(JSRuntime *rt
|
||||
MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
|
||||
explicit SPSEntryMarker(JSRuntime *rt,
|
||||
JSScript *script
|
||||
MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
|
||||
~SPSEntryMarker();
|
||||
|
||||
private:
|
||||
|
|
Загрузка…
Ссылка в новой задаче