зеркало из 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);
|
JS_CHECK_RECURSION(cx, return false);
|
||||||
|
|
||||||
SPSEntryMarker marker(cx->runtime());
|
SPSEntryMarker marker(cx->runtime(), state.script());
|
||||||
|
|
||||||
state.script()->ensureNonLazyCanonicalFunction(cx);
|
state.script()->ensureNonLazyCanonicalFunction(cx);
|
||||||
|
|
||||||
|
|
|
@ -318,7 +318,8 @@ SPSProfiler::allocProfileString(JSScript *script, JSFunction *maybeFun)
|
||||||
return cstr;
|
return cstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
SPSEntryMarker::SPSEntryMarker(JSRuntime *rt
|
SPSEntryMarker::SPSEntryMarker(JSRuntime *rt,
|
||||||
|
JSScript *script
|
||||||
MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
|
MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
|
||||||
: profiler(&rt->spsProfiler)
|
: profiler(&rt->spsProfiler)
|
||||||
{
|
{
|
||||||
|
@ -328,8 +329,9 @@ SPSEntryMarker::SPSEntryMarker(JSRuntime *rt
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
size_before = *profiler->size_;
|
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()
|
SPSEntryMarker::~SPSEntryMarker()
|
||||||
{
|
{
|
||||||
if (profiler != nullptr) {
|
if (profiler != nullptr) {
|
||||||
|
|
|
@ -246,8 +246,9 @@ SPSProfiler::stringsReset()
|
||||||
class SPSEntryMarker
|
class SPSEntryMarker
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit SPSEntryMarker(JSRuntime *rt
|
explicit SPSEntryMarker(JSRuntime *rt,
|
||||||
MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
|
JSScript *script
|
||||||
|
MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
|
||||||
~SPSEntryMarker();
|
~SPSEntryMarker();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче