| Index: src/debug/debug.cc
|
| diff --git a/src/debug/debug.cc b/src/debug/debug.cc
|
| index 955f86618213482fcee80aa69fc321ddf69ef27a..a59e49fb7d06fd3170f145c7a506cca774994b16 100644
|
| --- a/src/debug/debug.cc
|
| +++ b/src/debug/debug.cc
|
| @@ -1112,15 +1112,13 @@ bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) {
|
| List<Handle<JSFunction> > functions;
|
| List<Handle<JSGeneratorObject> > suspended_generators;
|
|
|
| - // Flush all optimized code maps. Note that the below heap iteration does not
|
| + // Flush all optimized code. Note that the below heap iteration does not
|
| // cover this, because the given function might have been inlined into code
|
| // for which no JSFunction exists.
|
| {
|
| SharedFunctionInfo::Iterator iterator(isolate_);
|
| while (SharedFunctionInfo* shared = iterator.Next()) {
|
| - if (!shared->OptimizedCodeMapIsCleared()) {
|
| - shared->ClearOptimizedCodeMap();
|
| - }
|
| + shared->ClearCodeFromOptimizedCodeMap();
|
| }
|
| }
|
|
|
| @@ -1162,6 +1160,7 @@ bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) {
|
|
|
| for (Handle<JSFunction> const function : functions) {
|
| function->ReplaceCode(shared->code());
|
| + JSFunction::EnsureLiterals(function);
|
| }
|
|
|
| for (Handle<JSGeneratorObject> const generator_obj : suspended_generators) {
|
|
|