[wasm][debug] Keep breakpointIdToDebuggerBreakpointIds alive on reload

Until now the breakpointIdToDebuggerBreakpointIds was cleared on page
reload. It keeps a map from breakpointIds to debuggerBreakpointIds,
with the latter being necessary for removing breakpoints.

If a breakpoint is set and we trigger a page reload, the
information about that breakpoint will be removed from the map,
even if it still exists. If we later want to remove the breakpoint
we look into the map, but the meta data is no longer existing.

Thus, reloading the page again will lead to hitting the breakpoint,
even if we removed it in the front-end.

This change keeps the map alive on page reset, so that we still
keep track of set breakpoints after a page reload.

Bug: chromium:1073071
Change-Id: I82192777bac7afc406245a5a1cff0620e8174499
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2253842
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68433}
This commit is contained in:
Kim-Anh Tran 2020-06-19 11:16:24 +02:00 committed by Commit Bot
parent f510c66b96
commit 09a5c855b7

View File

@ -1840,7 +1840,6 @@ void V8DebuggerAgentImpl::reset() {
m_scripts.clear();
m_cachedScriptIds.clear();
m_cachedScriptSize = 0;
m_breakpointIdToDebuggerBreakpointIds.clear();
}
void V8DebuggerAgentImpl::ScriptCollected(const V8DebuggerScript* script) {