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

Unified Diff: src/log.cc

Issue 7184027: Fix issue 1417: check for script source availability when enumerating optimized functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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 | « no previous file | test/cctest/cctest.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index f9c3b8830babd31a06ff9eefe67c276d18e34d4a..377dcb57cdb1ddfd824d6057b812de745205dc9b 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -1545,8 +1545,11 @@ class EnumerateOptimizedFunctionsVisitor: public OptimizedFunctionVisitor {
virtual void LeaveContext(Context* context) {}
virtual void VisitFunction(JSFunction* function) {
+ SharedFunctionInfo* sfi = SharedFunctionInfo::cast(function->shared());
+ if (sfi->script()->IsScript()
Kasper Lund 2011/06/17 05:20:21 Maybe cache sfi->script() in a new local? That wil
mnaganov (inactive) 2011/06/17 08:37:41 Done.
+ && !Script::cast(sfi->script())->HasValidSource()) return;
if (sfis_ != NULL) {
- sfis_[*count_] = Handle<SharedFunctionInfo>(function->shared());
+ sfis_[*count_] = Handle<SharedFunctionInfo>(sfi);
}
if (code_objects_ != NULL) {
ASSERT(function->code()->kind() == Code::OPTIMIZED_FUNCTION);
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698