Fixed comment and simplified the related code a bit.
authorsvenpanne@chromium.org <svenpanne@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 30 Aug 2012 06:45:45 +0000 (06:45 +0000)
committersvenpanne@chromium.org <svenpanne@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 30 Aug 2012 06:45:45 +0000 (06:45 +0000)
TBR=erik.corry@gmail.com

Review URL: https://chromiumcodereview.appspot.com/10911003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/ic.cc

index a8d16d3..b902b53 100644 (file)
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1323,15 +1323,9 @@ static bool LookupForWrite(Handle<JSObject> receiver,
     receiver->map()->LookupTransition(*receiver, *name, lookup);
   }
   if (!StoreICableLookup(lookup)) {
-    // 2nd chance: There can be accessors somewhere in the prototype chain. Note
-    // that we explicitly exclude native accessors for now, because the stubs
-    // are not yet prepared for this scenario.
+    // 2nd chance: There can be accessors somewhere in the prototype chain.
     receiver->Lookup(*name, lookup);
-    if (!lookup->IsPropertyCallbacks()) {
-      return false;
-    }
-    Handle<Object> callback(lookup->GetCallbackObject());
-    return StoreICableLookup(lookup);
+    return lookup->IsPropertyCallbacks() && StoreICableLookup(lookup);
   }
 
   if (lookup->IsInterceptor() &&