Index: src/liveedit.cc |
diff --git a/src/liveedit.cc b/src/liveedit.cc |
index f491e372047f9e7eadb376a7eb9f1b41d40b27d6..abb00993120dee48512ac48d997ecbe53c61ceae 100644 |
--- a/src/liveedit.cc |
+++ b/src/liveedit.cc |
@@ -1223,23 +1223,15 @@ static bool IsInlined(JSFunction* function, SharedFunctionInfo* candidate) { |
} |
-class DependentFunctionsDeoptimizingVisitor : public OptimizedFunctionVisitor { |
+class DependentFunctionFilter : public OptimizedFunctionFilter { |
public: |
- explicit DependentFunctionsDeoptimizingVisitor( |
+ explicit DependentFunctionFilter( |
SharedFunctionInfo* function_info) |
: function_info_(function_info) {} |
- virtual void EnterContext(Context* context) { |
- } |
- |
- virtual void VisitFunction(JSFunction* function) { |
- if (function->shared() == function_info_ || |
- IsInlined(function, function_info_)) { |
- Deoptimizer::DeoptimizeFunction(function); |
- } |
- } |
- |
- virtual void LeaveContext(Context* context) { |
+ virtual bool TakeFunction(JSFunction* function) { |
+ return (function->shared() == function_info_ || |
+ IsInlined(function, function_info_)); |
} |
private: |
@@ -1250,8 +1242,8 @@ class DependentFunctionsDeoptimizingVisitor : public OptimizedFunctionVisitor { |
static void DeoptimizeDependentFunctions(SharedFunctionInfo* function_info) { |
AssertNoAllocation no_allocation; |
- DependentFunctionsDeoptimizingVisitor visitor(function_info); |
- Deoptimizer::VisitAllOptimizedFunctions(&visitor); |
+ DependentFunctionFilter filter(function_info); |
+ Deoptimizer::DeoptimizeAllFunctionsWith(&filter); |
} |