Bug 1547655 - Move RootedAtom before LabelEmitter to work around LabelControl issues with Maybe<> and RootedAtom. r=arai
authorJan de Mooij <jdemooij@mozilla.com>
Mon, 29 Apr 2019 12:01:19 +0000
changeset 530546 af5f74d9a5668542afa6209c77e10fd5148b30ba
parent 530545 0bccc074dd9d9e0ccd73cd70d1f9215c1d066971
child 530547 58ac3afa5e9a346fbc66396219f3d8be7f3b781d
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarai
bugs1547655
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1547655 - Move RootedAtom before LabelEmitter to work around LabelControl issues with Maybe<> and RootedAtom. r=arai Differential Revision: https://phabricator.services.mozilla.com/D29186
js/src/frontend/BytecodeEmitter.cpp
js/src/jit-test/tests/parser/bug1547655.js
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -7602,18 +7602,18 @@ MOZ_NEVER_INLINE bool BytecodeEmitter::e
       return emitNameIncDec(incDec);
   }
 }
 
 // Using MOZ_NEVER_INLINE in here is a workaround for llvm.org/pr14047. See
 // the comment on emitSwitch.
 MOZ_NEVER_INLINE bool BytecodeEmitter::emitLabeledStatement(
     const LabeledStatement* labeledStmt) {
+  RootedAtom name(cx, labeledStmt->label());
   LabelEmitter label(this);
-  RootedAtom name(cx, labeledStmt->label());
   if (!label.emitLabel(name)) {
     return false;
   }
   if (!emitTree(labeledStmt->statement())) {
     return false;
   }
   if (!label.emitEnd()) {
     return false;
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/parser/bug1547655.js
@@ -0,0 +1,2 @@
+// |jit-test| allow-unhandlable-oom; allow-oom; skip-if: !('oomTest' in this)
+oomTest(() => evaluate(`meta: { with({}) {} }`));