зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1584034: Fix assert failure when inJit is invoked directly from runqueue (outside of JS context). r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D47260 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
6afb30f20d
Коммит
bf0855a4f8
|
@ -2955,7 +2955,13 @@ static bool testingFunc_inJit(JSContext* cx, unsigned argc, Value* vp) {
|
|||
|
||||
// Use frame iterator to inspect caller.
|
||||
FrameIter iter(cx);
|
||||
MOZ_ASSERT(!iter.done());
|
||||
|
||||
// We may be invoked directly, not in a JS context, e.g. if inJit is added as
|
||||
// a callback on the event queue.
|
||||
if (iter.done()) {
|
||||
args.rval().setBoolean(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (iter.hasScript()) {
|
||||
// Detect repeated attempts to compile, resetting the counter if inJit
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
import('./asdf.js').then(() => {}, inJit)
|
Загрузка…
Ссылка в новой задаче