Index: src/code-stubs.h |
diff --git a/src/code-stubs.h b/src/code-stubs.h |
index f8009a2697428b0241558a77015080b98000f1e0..2c9f1fb94d264c93044d0386dc097dcdbea7f10b 100644 |
--- a/src/code-stubs.h |
+++ b/src/code-stubs.h |
@@ -1084,7 +1084,7 @@ class StoreGlobalStub : public HandlerStub { |
CheckGlobalBits::encode(check_global)); |
} |
- static Handle<HeapObject> global_placeholder(Isolate* isolate) { |
+ static Handle<HeapObject> property_cell_placeholder(Isolate* isolate) { |
return isolate->factory()->uninitialized_value(); |
} |
@@ -1094,11 +1094,13 @@ class StoreGlobalStub : public HandlerStub { |
Code::FindAndReplacePattern pattern; |
pattern.Add(isolate()->factory()->meta_map(), |
Map::WeakCellForMap(Handle<Map>(global->map()))); |
- pattern.Add(isolate()->factory()->global_property_cell_map(), cell); |
+ pattern.Add(Handle<Map>(property_cell_placeholder(isolate())->map()), |
+ isolate()->factory()->NewWeakCell(cell)); |
return CodeStub::GetCodeCopy(pattern); |
} else { |
Code::FindAndReplacePattern pattern; |
- pattern.Add(isolate()->factory()->global_property_cell_map(), cell); |
+ pattern.Add(Handle<Map>(property_cell_placeholder(isolate())->map()), |
+ isolate()->factory()->NewWeakCell(cell)); |
return CodeStub::GetCodeCopy(pattern); |
} |
} |