зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1774848 part 3 - Push a profiler entry when resuming generators and async functions in the C++ interpreter. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D149864
This commit is contained in:
Родитель
3878b76d96
Коммит
6a2f271bac
|
@ -77,8 +77,7 @@ function testGenerator() {
|
|||
|
||||
assertEq(stacks.length, 3);
|
||||
for (var stack of stacks) {
|
||||
// TODO: this is missing the "generator" frame.
|
||||
assertStack(stack, ["testGenerator", "next"]);
|
||||
assertStack(stack, ["testGenerator", "next", "generator"]);
|
||||
}
|
||||
}
|
||||
testGenerator();
|
||||
|
@ -92,13 +91,11 @@ async function testAsync() {
|
|||
stacks.push(readGeckoInterpProfilingStack());
|
||||
};
|
||||
await asyncFun();
|
||||
// TODO: this is missing the "testAsync" frame.
|
||||
assertStack(readGeckoInterpProfilingStack(), ["AsyncFunctionNext"]);
|
||||
assertStack(readGeckoInterpProfilingStack(), ["AsyncFunctionNext", "testAsync"]);
|
||||
|
||||
assertEq(stacks.length, 2);
|
||||
assertStack(stacks[0], ["testAsync", "asyncFun"]);
|
||||
// TODO: this is missing the "asyncFun" frame.
|
||||
assertStack(stacks[1], ["AsyncFunctionNext"]);
|
||||
assertStack(stacks[1], ["AsyncFunctionNext", "asyncFun"]);
|
||||
}
|
||||
testAsync();
|
||||
drainJobQueue();
|
||||
|
|
|
@ -4332,6 +4332,11 @@ static MOZ_NEVER_INLINE JS_HAZ_JSNATIVE_CALLER bool Interpret(JSContext* cx,
|
|||
TraceLogStartEvent(logger, scriptEvent);
|
||||
TraceLogStartEvent(logger, TraceLogger_Interpreter);
|
||||
|
||||
if (!probes::EnterScript(cx, generatorScript,
|
||||
generatorScript->function(), REGS.fp())) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!DebugAPI::onResumeFrame(cx, REGS.fp())) {
|
||||
if (cx->isPropagatingForcedReturn()) {
|
||||
MOZ_ASSERT_IF(
|
||||
|
|
Загрузка…
Ссылка в новой задаче