diff options
author | Moonchild <moonchild@palemoon.org> | 2020-11-30 16:53:49 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-11-30 16:53:49 +0000 |
commit | bb31c1c65e8b7fcdd3a1d6b80a4fe4c1f5b3d10a (patch) | |
tree | 58c0aa4a647a2b635091354e942311c0d646c6bd | |
parent | 060e3eb0c8163698b52d59e333d9c4496c78a2c2 (diff) | |
download | UXP-bb31c1c65e8b7fcdd3a1d6b80a4fe4c1f5b3d10a.tar UXP-bb31c1c65e8b7fcdd3a1d6b80a4fe4c1f5b3d10a.tar.gz UXP-bb31c1c65e8b7fcdd3a1d6b80a4fe4c1f5b3d10a.tar.lz UXP-bb31c1c65e8b7fcdd3a1d6b80a4fe4c1f5b3d10a.tar.xz UXP-bb31c1c65e8b7fcdd3a1d6b80a4fe4c1f5b3d10a.zip |
Issue #1624 - Exclude function scopes from Ion compilation.
This seems to work around the problem with the compiled code stack for in-line
declared JS module code. Not optimal, for sure, but better than having to kill
Ion compilation outright.
-rw-r--r-- | js/src/jsscript.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/js/src/jsscript.h b/js/src/jsscript.h index d8d28ebeb..dfe0e486e 100644 --- a/js/src/jsscript.h +++ b/js/src/jsscript.h @@ -1443,7 +1443,14 @@ class JSScript : public js::gc::TenuredCell return res; } bool canIonCompile() const { - return ion != ION_DISABLED_SCRIPT; + // Exclude function scopes from Ion compilation. + // This is necessary to work around an issue with module scripts causing crashes + // with the function stack in Ion if module code is declared in-line. + // See Issue #1624 + // XXX: Perhaps we can further fine-grain select which types of function scope + // we have to exclude? + return (ion != ION_DISABLED_SCRIPT && + !bodyScope()->is<js::FunctionScope>()); } bool isIonCompilingOffThread() const { return ion == ION_COMPILING_SCRIPT; |