Fix Code::VerifyEmbeddedObjects.
authorulan <ulan@chromium.org>
Thu, 5 Feb 2015 15:25:26 +0000 (07:25 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 5 Feb 2015 15:25:34 +0000 (15:25 +0000)
BUG=

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

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

src/objects-debug.cc

index c31a79d..4e7cf8f 100644 (file)
@@ -1270,7 +1270,10 @@ void Code::VerifyEmbeddedObjects(VerifyMode mode) {
              RelocInfo::ModeMask(RelocInfo::CELL);
   bool skip_weak_cell = (mode == kNoContextSpecificPointers) ? false : true;
   for (RelocIterator it(this, mask); !it.done(); it.next()) {
-    CHECK(!CanLeak(it.rinfo()->target_object(), heap, skip_weak_cell));
+    Object* target = it.rinfo()->rmode() == RelocInfo::CELL
+                         ? it.rinfo()->target_cell()
+                         : it.rinfo()->target_object();
+    CHECK(!CanLeak(target, heap, skip_weak_cell));
   }
 }