bool StackFrame::pushBlock(JSContext *cx, StaticBlockObject &block) { JS_ASSERT (block.needsClone()); Rooted<StaticBlockObject *> blockHandle(cx, &block); ClonedBlockObject *clone = ClonedBlockObject::create(cx, blockHandle, this); if (!clone) return false; pushOnScopeChain(*clone); return true; }
bool StackFrame::pushBlock(JSContext *cx, StaticBlockObject &block) { JS_ASSERT_IF(hasBlockChain(), blockChain_ == block.enclosingBlock()); if (block.needsClone()) { Rooted<StaticBlockObject *> blockHandle(cx, &block); ClonedBlockObject *clone = ClonedBlockObject::create(cx, blockHandle, this); if (!clone) return false; pushOnScopeChain(*clone); } flags_ |= HAS_BLOCKCHAIN; blockChain_ = █ return true; }