DevTools: Fix flickering scripts with damaged functions
When a script has a function with multiple const declarations for the
same variable, ex:
function hey(){
const duplicate = 0;
const duplicate = 1;
}
The script that contains this function will parse correctly, but
when the function `hey` is run a scriptFailedParse event will be
emitted. DevTools only ever expects to get one script parsing
event per scriptId, and this causes flickering of the script in
the Sources panel.
This patch swallows subsequent script parsing events for a script.
Bug: 864296
Change-Id: I55a2e865b665e8fe1283a3dd19e9f152d0982b97
Reviewed-on: https://chromium-review.googlesource.com/1140782
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Reviewed-by:
Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by:
Andrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588901}
Showing
Please register or sign in to comment