summaryrefslogtreecommitdiffstats
path: root/src/debug.cc
diff options
context:
space:
mode:
authorLeon Clarke <leonclarke@google.com>2010-01-27 15:57:47 +0000
committerLeon Clarke <leonclarke@google.com>2010-01-27 15:57:47 +0000
commit888f6729be6a6f6fbe246cb5a9f122e2dbe455b7 (patch)
tree16f9ce250ef5d36e49a0fb0018e979002ed5b4fb /src/debug.cc
parent1471e9f5b6f291eea8447f441527cd2a85074a33 (diff)
downloadandroid_external_v8-888f6729be6a6f6fbe246cb5a9f122e2dbe455b7.tar.gz
android_external_v8-888f6729be6a6f6fbe246cb5a9f122e2dbe455b7.tar.bz2
android_external_v8-888f6729be6a6f6fbe246cb5a9f122e2dbe455b7.zip
Pull from svn bleeding_edge@3716
Diffstat (limited to 'src/debug.cc')
-rw-r--r--src/debug.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/debug.cc b/src/debug.cc
index 34b3a6d5..fc809c56 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -1695,9 +1695,7 @@ void Debug::CreateScriptCache() {
// Scan heap for Script objects.
int count = 0;
HeapIterator iterator;
- while (iterator.has_next()) {
- HeapObject* obj = iterator.next();
- ASSERT(obj != NULL);
+ for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
if (obj->IsScript() && Script::cast(obj)->HasValidSource()) {
script_cache_->Add(Handle<Script>(Script::cast(obj)));
count++;