Index: src/arm/stub-cache-arm.cc |
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc |
index 6fd50630a128d53f960db2a16be384011b072ee8..7a3c80f7b5797ef7337d12f0b7197dd6dea09711 100644 |
--- a/src/arm/stub-cache-arm.cc |
+++ b/src/arm/stub-cache-arm.cc |
@@ -95,12 +95,13 @@ static void ProbeTable(Isolate* isolate, |
// must always call a backup property check that is complete. |
// This function is safe to call if the receiver has fast properties. |
// Name must be a symbol and receiver must be a heap object. |
-static void GenerateDictionaryNegativeLookup(MacroAssembler* masm, |
- Label* miss_label, |
- Register receiver, |
- String* name, |
- Register scratch0, |
- Register scratch1) { |
+MUST_USE_RESULT static MaybeObject* GenerateDictionaryNegativeLookup( |
+ MacroAssembler* masm, |
+ Label* miss_label, |
+ Register receiver, |
+ String* name, |
+ Register scratch0, |
+ Register scratch1) { |
ASSERT(name->IsSymbol()); |
Counters* counters = masm->isolate()->counters(); |
__ IncrementCounter(counters->negative_lookups(), 1, scratch0, scratch1); |
@@ -137,16 +138,20 @@ static void GenerateDictionaryNegativeLookup(MacroAssembler* masm, |
__ ldr(properties, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); |
- StringDictionaryLookupStub::GenerateNegativeLookup(masm, |
- miss_label, |
- &done, |
- receiver, |
- properties, |
- name, |
- scratch1); |
+ MaybeObject* result = StringDictionaryLookupStub::GenerateNegativeLookup( |
+ masm, |
+ miss_label, |
+ &done, |
+ receiver, |
+ properties, |
+ name, |
+ scratch1); |
+ if (result->IsFailure()) return result; |
__ bind(&done); |
__ DecrementCounter(counters->negative_lookups_miss(), 1, scratch0, scratch1); |
+ |
+ return result; |
} |
@@ -1048,12 +1053,17 @@ Register StubCompiler::CheckPrototypes(JSObject* object, |
ASSERT(current->property_dictionary()->FindEntry(name) == |
StringDictionary::kNotFound); |
- GenerateDictionaryNegativeLookup(masm(), |
- miss, |
- reg, |
- name, |
- scratch1, |
- scratch2); |
+ MaybeObject* negative_lookup = GenerateDictionaryNegativeLookup(masm(), |
+ miss, |
+ reg, |
+ name, |
+ scratch1, |
+ scratch2); |
+ if (negative_lookup->IsFailure()) { |
+ set_failure(Failure::cast(negative_lookup)); |
+ return reg; |
+ } |
+ |
__ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); |
reg = holder_reg; // from now the object is in holder_reg |
__ ldr(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset)); |