diff options
Diffstat (limited to 'deps/v8/src/debug/liveedit.cc')
-rw-r--r-- | deps/v8/src/debug/liveedit.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/deps/v8/src/debug/liveedit.cc b/deps/v8/src/debug/liveedit.cc index 83beb194d8..b7ae4aa3ce 100644 --- a/deps/v8/src/debug/liveedit.cc +++ b/deps/v8/src/debug/liveedit.cc @@ -654,7 +654,8 @@ class FunctionDataMap : public ThreadVisitor { } void VisitThread(Isolate* isolate, ThreadLocalTop* top) override { - for (JavaScriptFrameIterator it(isolate, top); !it.done(); it.Advance()) { + for (JavaScriptStackFrameIterator it(isolate, top); !it.done(); + it.Advance()) { std::vector<Handle<SharedFunctionInfo>> sfis; it.frame()->GetFunctions(&sfis); for (auto& sfi : sfis) { @@ -701,6 +702,11 @@ bool CanPatchScript(const LiteralMap& changed, Handle<Script> script, Handle<SharedFunctionInfo> sfi; if (!data->shared.ToHandle(&sfi)) { continue; + } else if (IsModule(sfi->kind())) { + DCHECK(script->origin_options().IsModule() && sfi->is_toplevel()); + result->status = + debug::LiveEditResult::BLOCKED_BY_TOP_LEVEL_ES_MODULE_CHANGE; + return false; } else if (data->stack_position == FunctionData::ON_STACK) { result->status = debug::LiveEditResult::BLOCKED_BY_ACTIVE_FUNCTION; return false; @@ -975,7 +981,7 @@ void LiveEdit::PatchScript(Isolate* isolate, Handle<Script> script, isolate->compilation_cache()->Remove(sfi); for (auto& js_function : data->js_functions) { js_function->set_shared(*new_sfi); - js_function->set_code(js_function->shared().GetCode(), kReleaseStore); + js_function->set_code(js_function->shared().GetCode(isolate)); js_function->set_raw_feedback_cell( *isolate->factory()->many_closures_cell()); |