Index: src/ic.cc |
=================================================================== |
--- src/ic.cc (revision 12239) |
+++ src/ic.cc (working copy) |
@@ -989,7 +989,7 @@ |
if (callback->IsAccessorInfo()) { |
Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(callback); |
if (v8::ToCData<Address>(info->getter()) == 0) return; |
- if (!receiver->HasFastProperties()) return; |
+ if (!holder->HasFastProperties()) return; |
if (!info->IsCompatibleReceiver(*receiver)) return; |
code = isolate()->stub_cache()->ComputeLoadCallback( |
name, receiver, holder, info); |
@@ -997,7 +997,7 @@ |
Handle<Object> getter(Handle<AccessorPair>::cast(callback)->getter()); |
if (!getter->IsJSFunction()) return; |
if (holder->IsGlobalObject()) return; |
- if (!receiver->HasFastProperties()) return; |
+ if (!holder->HasFastProperties()) return; |
code = isolate()->stub_cache()->ComputeLoadViaGetter( |
name, receiver, holder, Handle<JSFunction>::cast(getter)); |
} else { |
@@ -1266,7 +1266,7 @@ |
Handle<AccessorInfo> callback = |
Handle<AccessorInfo>::cast(callback_object); |
if (v8::ToCData<Address>(callback->getter()) == 0) return; |
- if (!receiver->HasFastProperties()) return; |
+ if (!holder->HasFastProperties()) return; |
if (!callback->IsCompatibleReceiver(*receiver)) return; |
code = isolate()->stub_cache()->ComputeKeyedLoadCallback( |
name, receiver, holder, callback); |
@@ -1325,7 +1325,9 @@ |
// that we explicitly exclude native accessors for now, because the stubs |
// are not yet prepared for this scenario. |
receiver->Lookup(*name, lookup); |
- if (!lookup->IsPropertyCallbacks()) return false; |
+ if (!lookup->IsPropertyCallbacks()) { |
+ return false; |
+ } |
Handle<Object> callback(lookup->GetCallbackObject()); |
return callback->IsAccessorPair() && StoreICableLookup(lookup); |
} |
@@ -1487,9 +1489,10 @@ |
case CALLBACKS: { |
Handle<Object> callback(lookup->GetCallbackObject()); |
if (callback->IsAccessorInfo()) { |
+ ASSERT(*holder == *receiver); // LookupForWrite checks this. |
Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(callback); |
if (v8::ToCData<Address>(info->setter()) == 0) return; |
- if (!receiver->HasFastProperties()) return; |
+ if (!holder->HasFastProperties()) return; |
ASSERT(info->IsCompatibleReceiver(*receiver)); |
code = isolate()->stub_cache()->ComputeStoreCallback( |
name, receiver, info, strict_mode); |
@@ -1497,7 +1500,7 @@ |
Handle<Object> setter(Handle<AccessorPair>::cast(callback)->setter()); |
if (!setter->IsJSFunction()) return; |
if (holder->IsGlobalObject()) return; |
- if (!receiver->HasFastProperties()) return; |
+ if (!holder->HasFastProperties()) return; |
code = isolate()->stub_cache()->ComputeStoreViaSetter( |
name, receiver, holder, Handle<JSFunction>::cast(setter), |
strict_mode); |