Bug 1368362 - Use setSlotWithType instead of setSlot in InitGlobalLexicalOperation. r=shu, a=abillings
authorJan de Mooij <jdemooij@mozilla.com>
Mon, 24 Jul 2017 18:41:12 -0400
changeset 414436 6223be841811af7515f8a157814c82b27259c0b7
parent 414435 d1342d04957e91a09a670d8bb033cb2022f8ee57
child 414437 3d3cf32c21d539abac825ddbf8bddb162053b691
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshu, abillings
bugs1368362
milestone55.0
Bug 1368362 - Use setSlotWithType instead of setSlot in InitGlobalLexicalOperation. r=shu, a=abillings
js/src/vm/Interpreter-inl.h
--- a/js/src/vm/Interpreter-inl.h
+++ b/js/src/vm/Interpreter-inl.h
@@ -393,17 +393,17 @@ InitGlobalLexicalOperation(JSContext* cx
                            JSScript* script, jsbytecode* pc, HandleValue value)
 {
     MOZ_ASSERT_IF(!script->hasNonSyntacticScope(),
                   lexicalEnvArg == &cx->global()->lexicalEnvironment());
     MOZ_ASSERT(*pc == JSOP_INITGLEXICAL);
     Rooted<LexicalEnvironmentObject*> lexicalEnv(cx, lexicalEnvArg);
     RootedShape shape(cx, lexicalEnv->lookup(cx, script->getName(pc)));
     MOZ_ASSERT(shape);
-    lexicalEnv->setSlot(shape->slot(), value);
+    lexicalEnv->setSlotWithType(cx, shape, value);
 }
 
 inline bool
 InitPropertyOperation(JSContext* cx, JSOp op, HandleObject obj, HandleId id, HandleValue rhs)
 {
     if (obj->is<PlainObject>() || obj->is<JSFunction>()) {
         unsigned propAttrs = GetInitDataPropAttrs(op);
         return NativeDefineProperty(cx, obj.as<NativeObject>(), id, rhs, nullptr, nullptr,