Index: src/builtins/builtins-object.cc |
diff --git a/src/builtins/builtins-object.cc b/src/builtins/builtins-object.cc |
index 85254d5dcd7527489d9f95424ff7865175013b6b..eba065e5b345484dc91e912248efc52b92df2b34 100644 |
--- a/src/builtins/builtins-object.cc |
+++ b/src/builtins/builtins-object.cc |
@@ -48,6 +48,10 @@ void Builtins::Generate_ObjectHasOwnProperty( |
&return_false, &call_runtime); |
assembler.Bind(&keyisindex); |
+ // Handle negative keys in the runtime. |
+ assembler.GotoIf( |
+ assembler.IntPtrLessThan(var_index.value(), assembler.IntPtrConstant(0)), |
+ &call_runtime); |
assembler.TryLookupElement(object, map, instance_type, var_index.value(), |
&return_true, &return_false, &call_runtime); |