Bug 1235092 - Part 3: Root function in BytecodeEmitter::isRestParameter. r=bustage
authorTooru Fujisawa <arai_a@mac.com>
Wed, 13 Jan 2016 21:58:47 +0900
changeset 279775 068ab119a0f781ba85e34ec25e55efde1ca733ec
parent 279774 6346790559d1a5de9bd0632a6b009bd2f691e290
child 279776 f5ef13bfbf24b683f8dd1af8e9793072b389f77e
push id70199
push userarai_a@mac.com
push dateWed, 13 Jan 2016 13:01:05 +0000
treeherdermozilla-inbound@068ab119a0f7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1235092
milestone46.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 1235092 - Part 3: Root function in BytecodeEmitter::isRestParameter. r=bustage
js/src/frontend/BytecodeEmitter.cpp
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -7341,17 +7341,17 @@ BytecodeEmitter::emitSelfHostedAllowCont
 bool
 BytecodeEmitter::isRestParameter(ParseNode* pn, bool* result)
 {
     if (!sc->isFunctionBox()) {
         *result = false;
         return true;
     }
 
-    JSFunction* fun = sc->asFunctionBox()->function();
+    RootedFunction fun(cx, sc->asFunctionBox()->function());
     if (!fun->hasRest()) {
         *result = false;
         return true;
     }
 
     if (!pn->isKind(PNK_NAME)) {
         if (emitterMode == BytecodeEmitter::SelfHosting && pn->isKind(PNK_CALL)) {
             ParseNode* pn2 = pn->pn_head;