Index: src/ia32/stub-cache-ia32.cc |
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc |
index 30e9dee22cd10fd04de1e82dbb32f33eb2bbae51..7f28ec45c71c1d67de154c03e8940ca40b221f52 100644 |
--- a/src/ia32/stub-cache-ia32.cc |
+++ b/src/ia32/stub-cache-ia32.cc |
@@ -107,12 +107,12 @@ 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 r0, |
- Register r1) { |
+static MaybeObject* GenerateDictionaryNegativeLookup(MacroAssembler* masm, |
+ Label* miss_label, |
+ Register receiver, |
+ String* name, |
+ Register r0, |
+ Register r1) { |
ASSERT(name->IsSymbol()); |
Counters* counters = masm->isolate()->counters(); |
__ IncrementCounter(counters->negative_lookups(), 1); |
@@ -142,14 +142,19 @@ static void GenerateDictionaryNegativeLookup(MacroAssembler* masm, |
__ j(not_equal, miss_label); |
Label done; |
- StringDictionaryLookupStub::GenerateNegativeLookup(masm, |
- miss_label, |
- &done, |
- properties, |
- name, |
- r1); |
+ MaybeObject* result = |
+ StringDictionaryLookupStub::GenerateNegativeLookup(masm, |
+ miss_label, |
+ &done, |
+ properties, |
+ name, |
+ r1); |
+ if(result->IsFailure()) return result; |
+ |
__ bind(&done); |
__ DecrementCounter(counters->negative_lookups_miss(), 1); |
+ |
+ return result; |
} |
@@ -901,12 +906,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; |
+ } |
+ |
__ mov(scratch1, FieldOperand(reg, HeapObject::kMapOffset)); |
reg = holder_reg; // from now the object is in holder_reg |
__ mov(reg, FieldOperand(scratch1, Map::kPrototypeOffset)); |