Reland r26549 "Fix IsWeakObjectInOptimizedCode predicate to also include property...
authorulan <ulan@chromium.org>
Wed, 11 Feb 2015 09:59:41 +0000 (01:59 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 11 Feb 2015 09:59:49 +0000 (09:59 +0000)
BUG=v8:3882
LOG=NO

Review URL: https://codereview.chromium.org/913093002

Cr-Commit-Position: refs/heads/master@{#26573}

src/objects-inl.h

index 4aadf12d78e17876a7928c934e1376f9d607dfb7..c275ade935cec7af80f1a67a318ac6a7747c9efc 100644 (file)
@@ -5242,7 +5242,11 @@ bool Code::IsWeakObjectInOptimizedCode(Object* object) {
     return Map::cast(object)->CanTransition() &&
            FLAG_weak_embedded_maps_in_optimized_code;
   }
-  if (object->IsCell()) object = Cell::cast(object)->value();
+  if (object->IsCell()) {
+    object = Cell::cast(object)->value();
+  } else if (object->IsPropertyCell()) {
+    object = PropertyCell::cast(object)->value();
+  }
   if (object->IsJSObject()) {
     return FLAG_weak_embedded_objects_in_optimized_code;
   }