Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index 6c83606f1dc83e5dd61dd365720238b09ff59151..c3da98e73f9ca8ed971fe3f6c5cffc9a40b457c2 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -82,12 +82,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 r0, |
- Register r1) { |
+MUST_USE_RESULT 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); |
@@ -117,14 +118,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; |
} |
@@ -857,12 +863,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; |
+ } |
+ |
__ movq(scratch1, FieldOperand(reg, HeapObject::kMapOffset)); |
reg = holder_reg; // from now the object is in holder_reg |
__ movq(reg, FieldOperand(scratch1, Map::kPrototypeOffset)); |