Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: src/runtime/runtime-debug.cc

Issue 1300333003: Introduce SharedFunctionInfo::Iterator and Script::Iterator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index 41372e46946314cfb1eee5ecd624c3b02ecd9313..5177528f482303a6ce296472bd0ba4568319edd2 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -1602,13 +1602,10 @@ RUNTIME_FUNCTION(Runtime_GetScript) {
CONVERT_ARG_HANDLE_CHECKED(String, script_name, 0);
Handle<Script> found;
- Heap* heap = isolate->heap();
{
- HeapIterator iterator(heap);
- HeapObject* obj = NULL;
- while ((obj = iterator.next()) != NULL) {
- if (!obj->IsScript()) continue;
- Script* script = Script::cast(obj);
+ Script::Iterator iterator(isolate);
+ Script* script = NULL;
+ while ((script = iterator.Next()) != NULL) {
if (!script->name()->IsString()) continue;
String* name = String::cast(script->name());
if (name->Equals(*script_name)) {
@@ -1618,7 +1615,7 @@ RUNTIME_FUNCTION(Runtime_GetScript) {
}
}
- if (found.is_null()) return heap->undefined_value();
+ if (found.is_null()) return isolate->heap()->undefined_value();
return *Script::GetWrapper(found);
}
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698