From 0f6f621522c886e71d1f2d62a2f63267b47d5791 Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Fri, 30 Aug 2013 07:48:04 +0000 Subject: [PATCH] Assert external strings in external string table. Remove TODOs. R=hpayer@chromium.org BUG= Review URL: https://codereview.chromium.org/23567002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/heap-inl.h | 2 -- src/heap.cc | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/heap-inl.h b/src/heap-inl.h index 6caa742..9d04797 100644 --- a/src/heap-inl.h +++ b/src/heap-inl.h @@ -718,13 +718,11 @@ void ExternalStringTable::Verify() { #ifdef DEBUG for (int i = 0; i < new_space_strings_.length(); ++i) { Object* obj = Object::cast(new_space_strings_[i]); - // TODO(yangguo): check that the object is indeed an external string. ASSERT(heap_->InNewSpace(obj)); ASSERT(obj != HEAP->the_hole_value()); } for (int i = 0; i < old_space_strings_.length(); ++i) { Object* obj = Object::cast(old_space_strings_[i]); - // TODO(yangguo): check that the object is indeed an external string. ASSERT(!heap_->InNewSpace(obj)); ASSERT(obj != HEAP->the_hole_value()); } diff --git a/src/heap.cc b/src/heap.cc index 7bfb07e..d4425ea 100644 --- a/src/heap.cc +++ b/src/heap.cc @@ -7916,6 +7916,7 @@ void ExternalStringTable::CleanUp() { if (new_space_strings_[i] == heap_->the_hole_value()) { continue; } + ASSERT(new_space_strings_[i]->IsExternalString()); if (heap_->InNewSpace(new_space_strings_[i])) { new_space_strings_[last++] = new_space_strings_[i]; } else { @@ -7930,6 +7931,7 @@ void ExternalStringTable::CleanUp() { if (old_space_strings_[i] == heap_->the_hole_value()) { continue; } + ASSERT(old_space_strings_[i]->IsExternalString()); ASSERT(!heap_->InNewSpace(old_space_strings_[i])); old_space_strings_[last++] = old_space_strings_[i]; } -- 2.7.4