Index: test/cctest/test-serialize.cc |
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc |
index d7051d3b80ac6086ce2bcdad93b5b5676033fad9..92427364d5f804fbd5956044d5c74e8410c53dec 100644 |
--- a/test/cctest/test-serialize.cc |
+++ b/test/cctest/test-serialize.cc |
@@ -1806,10 +1806,14 @@ TEST(CodeSerializerEagerCompilationAndPreAge) { |
HandleScope i_scope(i_isolate); |
Handle<SharedFunctionInfo> toplevel = v8::Utils::OpenHandle(*unbound); |
Handle<Script> script(Script::cast(toplevel->script())); |
- WeakFixedArray::Iterator iterator(script->shared_function_infos()); |
// Every function has been pre-compiled from the code cache. |
int count = 0; |
- while (SharedFunctionInfo* shared = iterator.Next<SharedFunctionInfo>()) { |
+ for (int index = 0; index < script->shared_function_infos()->length(); |
+ ++index) { |
+ Object* raw = script->shared_function_infos()->get(index); |
+ if (raw->IsSmi()) continue; |
+ SharedFunctionInfo* shared = |
+ SharedFunctionInfo::cast(WeakCell::cast(raw)->value()); |
CHECK(shared->is_compiled()); |
CHECK_EQ(Code::kPreAgedCodeAge, shared->code()->GetAge()); |
count++; |