Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index dba2c17bbd859a663d05bfa1cb2b14f1358e1f90..53cf97ceb479eb54daccbceff411c45f3ece0394 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -3370,9 +3370,10 @@ void HGraphBuilder::HandleGlobalVariableAssignment(Variable* var, |
LookupGlobalPropertyCell(var, &lookup, true); |
CHECK_BAILOUT; |
+ bool check_hole = !lookup.IsDontDelete() || lookup.IsReadOnly(); |
Handle<GlobalObject> global(graph()->info()->global_object()); |
Handle<JSGlobalPropertyCell> cell(global->GetPropertyCell(&lookup)); |
- HInstruction* instr = new HStoreGlobal(value, cell); |
+ HInstruction* instr = new HStoreGlobal(value, cell, check_hole); |
instr->set_position(position); |
AddInstruction(instr); |
if (instr->HasSideEffects()) AddSimulate(ast_id); |