Index: src/stub-cache.cc |
diff --git a/src/stub-cache.cc b/src/stub-cache.cc |
index 436cd46ce162df28ac14c17a1f37d533393f6004..d554d0cb0a5bb9a1490a0e8b7cd07e382382e432 100644 |
--- a/src/stub-cache.cc |
+++ b/src/stub-cache.cc |
@@ -563,16 +563,15 @@ Handle<Code> StubCache::ComputeStoreGlobal(Handle<Name> name, |
Code::STORE_IC, Code::NORMAL, stub.GetExtraICState()); |
if (!code.is_null()) return code; |
- if (is_constant) return stub.GetCode(isolate_); |
- |
// Replace the placeholder cell and global object map with the actual global |
// cell and receiver map. |
- Handle<Map> cell_map(isolate_->heap()->global_property_cell_map()); |
Handle<Map> meta_map(isolate_->heap()->meta_map()); |
Handle<Object> receiver_map(receiver->map(), isolate_); |
code = stub.GetCodeCopyFromTemplate(isolate_); |
code->ReplaceNthObject(1, *meta_map, *receiver_map); |
+ Handle<Map> cell_map(isolate_->heap()->global_property_cell_map()); |
code->ReplaceNthObject(1, *cell_map, *cell); |
+ |
JSObject::UpdateMapCodeCache(receiver, name, code); |
return code; |