Fix issue 1417: check for script source availability when enumerating optimized functions.

R=kasperl@chromium.org,kmillikin@chromium.org
BUG=1417
TEST=test-log/Issue23768

Review URL: http://codereview.chromium.org/7184027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 7ba9fea8
...@@ -1545,8 +1545,12 @@ class EnumerateOptimizedFunctionsVisitor: public OptimizedFunctionVisitor { ...@@ -1545,8 +1545,12 @@ class EnumerateOptimizedFunctionsVisitor: public OptimizedFunctionVisitor {
virtual void LeaveContext(Context* context) {} virtual void LeaveContext(Context* context) {}
virtual void VisitFunction(JSFunction* function) { virtual void VisitFunction(JSFunction* function) {
SharedFunctionInfo* sfi = SharedFunctionInfo::cast(function->shared());
Object* maybe_script = sfi->script();
if (maybe_script->IsScript()
&& !Script::cast(maybe_script)->HasValidSource()) return;
if (sfis_ != NULL) { if (sfis_ != NULL) {
sfis_[*count_] = Handle<SharedFunctionInfo>(function->shared()); sfis_[*count_] = Handle<SharedFunctionInfo>(sfi);
} }
if (code_objects_ != NULL) { if (code_objects_ != NULL) {
ASSERT(function->code()->kind() == Code::OPTIMIZED_FUNCTION); ASSERT(function->code()->kind() == Code::OPTIMIZED_FUNCTION);
......
...@@ -33,9 +33,6 @@ test-api/Bug*: FAIL ...@@ -33,9 +33,6 @@ test-api/Bug*: FAIL
# BUG(382): Weird test. Can't guarantee that it never times out. # BUG(382): Weird test. Can't guarantee that it never times out.
test-api/ApplyInterruption: PASS || TIMEOUT test-api/ApplyInterruption: PASS || TIMEOUT
# BUG(1417): Crashes with --stress-opt --always-opt.
test-log/Issue23768: PASS || CRASH
# These tests always fail. They are here to test test.py. If # These tests always fail. They are here to test test.py. If
# they don't fail then test.py has failed. # they don't fail then test.py has failed.
test-serialize/TestThatAlwaysFails: FAIL test-serialize/TestThatAlwaysFails: FAIL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment