Chromium Code Reviews| Index: src/debug/debug.cc |
| diff --git a/src/debug/debug.cc b/src/debug/debug.cc |
| index d99435c845756c5757a50498a5374662a8b22492..8604c19f7914a4c93097e2494f1e38131ba9645d 100644 |
| --- a/src/debug/debug.cc |
| +++ b/src/debug/debug.cc |
| @@ -1305,8 +1305,16 @@ bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) { |
| List<Handle<JSFunction> > functions; |
| List<Handle<JSGeneratorObject> > suspended_generators; |
| - if (!shared->optimized_code_map()->IsSmi()) { |
| - shared->ClearOptimizedCodeMap(); |
| + // Flush all optimized code maps. Only flushing the optimized code map of the |
| + // give shared function info {shared} is not enough, because other functions |
| + // might have inlined the given function and don't contain breakpoints. |
|
Yang
2015/11/05 18:46:49
See below. We already deal with inlining.
|
| + { |
| + SharedFunctionInfo::Iterator iterator(isolate_); |
| + while (SharedFunctionInfo* shared = iterator.Next()) { |
| + if (!shared->optimized_code_map()->IsSmi()) { |
| + shared->ClearOptimizedCodeMap(); |
| + } |
| + } |
| } |
| // Make sure we abort incremental marking. |