Bug 829294 - Some rooting for ClonedBlockScopeObject in DebugScopeProxy. r=terrence
authorTom Schuster <evilpies@gmail.com>
Fri, 11 Jan 2013 16:47:07 +0100
changeset 118575 7c92fc2dcd48c2526b41d0adb2183c3ce126b0f7
parent 118574 575c6e6283b68b4c8e17423e2295b03bd4a49eda
child 118576 1803280504e73cbf9e14f2fe3dd5e1914c71bf06
push id21144
push userevilpies@gmail.com
push dateFri, 11 Jan 2013 15:47:42 +0000
treeherdermozilla-inbound@bf379a4b7234 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs829294
milestone21.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 829294 - Some rooting for ClonedBlockScopeObject in DebugScopeProxy. r=terrence
js/src/vm/ScopeObject.cpp
--- a/js/src/vm/ScopeObject.cpp
+++ b/js/src/vm/ScopeObject.cpp
@@ -1221,39 +1221,39 @@ class DebugScopeProxy : public BaseProxy
                     TypeScript::SetArgument(cx, script, i, *vp);
             }
 
             return true;
         }
 
         /* Handle unaliased let and catch bindings at block scope. */
         if (scope->isClonedBlock()) {
-            ClonedBlockObject &block = scope->asClonedBlock();
-            UnrootedShape shape = block.lastProperty()->search(cx, id);
+            Rooted<ClonedBlockObject *> block(cx, &scope->asClonedBlock());
+            UnrootedShape shape = block->lastProperty()->search(cx, id);
             if (!shape)
                 return false;
 
             AutoAssertNoGC nogc;
             unsigned i = shape->shortid();
-            if (block.staticBlock().isAliased(i))
+            if (block->staticBlock().isAliased(i))
                 return false;
 
             if (maybefp) {
                 UnrootedScript script = maybefp->script();
-                unsigned local = block.slotToLocalIndex(script->bindings, shape->slot());
+                unsigned local = block->slotToLocalIndex(script->bindings, shape->slot());
                 if (action == GET)
                     *vp = maybefp->unaliasedLocal(local);
                 else
                     maybefp->unaliasedLocal(local) = *vp;
                 JS_ASSERT(analyze::LocalSlot(script, local) >= analyze::TotalSlots(script));
             } else {
                 if (action == GET)
-                    *vp = block.var(i, DONT_CHECK_ALIASING);
+                    *vp = block->var(i, DONT_CHECK_ALIASING);
                 else
-                    block.setVar(i, *vp, DONT_CHECK_ALIASING);
+                    block->setVar(i, *vp, DONT_CHECK_ALIASING);
             }
 
             return true;
         }
 
         /* The rest of the internal scopes do not have unaliased vars. */
         JS_ASSERT(scope->isDeclEnv() || scope->isWith() || scope->asCall().isForEval());
         return false;