Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Issue 2832943002: DevTools: properly handle target suspension/resuming in NetworkProject (Closed)

Created:
3 years, 8 months ago by lushnikov
Modified:
3 years, 7 months ago
Reviewers:
dgozman
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, pfeldman, kozyatinskiy+blink_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: properly handle target suspension/resuming in NetworkProject NetworkProject adds UISourceCode in response to DebuggerModel.scriptParsed event and removes UISourceCode in response to RuntimeModel.executionContextDestroyed. In case of target suspension, the runtimeModel is not getting suspended and does not destroy execution contexts. But DebuggerModel does get suspended and later gets resumed, which results in duplicate scriptParsed events. This patch starts listening to globalObjectCleared event in NetworkProject to clean up scripts on target suspension. Drive-by: promisify targetManager.suspendAllTargets(), make methods to enable/disable debugger private. R=dgozman BUG=670180 Review-Url: https://codereview.chromium.org/2832943002 Cr-Commit-Position: refs/heads/master@{#469791} Committed: https://chromium.googlesource.com/chromium/src/+/50d089bc61f3dd1546a1a6f6267f097db24fb541

Patch Set 1 #

Patch Set 2 : fix tests #

Patch Set 3 : nit #

Patch Set 4 : listen to globalObjectCleared #

Patch Set 5 : add tests #

Total comments: 6

Patch Set 6 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+317 lines, -51 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/inspector/bindings/resources/sourcemap-script.js View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/bindings/resources/sourcemap-typescript.ts View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/bindings/suspendtarget-bindings.html View 1 4 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/bindings/suspendtarget-bindings-expected.txt View 4 1 chunk +92 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/bindings/suspendtarget-navigator.html View 4 1 chunk +46 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/bindings/suspendtarget-navigator-expected.txt View 4 1 chunk +69 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/profiler/agents-disabled-check.html View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/debugger-disable-add-breakpoint.html View 1 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/bindings/NetworkProject.js View 1 2 3 3 chunks +21 lines, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js View 1 2 3 3 chunks +19 lines, -38 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js View 1 2 3 4 5 3 chunks +13 lines, -5 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 30 (23 generated)
lushnikov
please, take a look
3 years, 8 months ago (2017-04-21 00:39:03 UTC) #2
dgozman
We spent some time discussing this and decided to fix all the issues on higher ...
3 years, 8 months ago (2017-04-21 22:58:22 UTC) #15
lushnikov
please, take a look. Implemented a new approach which listens to DebuggerModel.globalObjectCleared event, as discussed ...
3 years, 7 months ago (2017-05-04 22:21:44 UTC) #18
dgozman
lgtm https://codereview.chromium.org/2832943002/diff/80001/third_party/WebKit/LayoutTests/http/tests/inspector/bindings/resources/sourcemap-script.js File third_party/WebKit/LayoutTests/http/tests/inspector/bindings/resources/sourcemap-script.js (right): https://codereview.chromium.org/2832943002/diff/80001/third_party/WebKit/LayoutTests/http/tests/inspector/bindings/resources/sourcemap-script.js#newcode7 third_party/WebKit/LayoutTests/http/tests/inspector/bindings/resources/sourcemap-script.js:7: //# sourceMappingURL=sourcemap-script.js.map Don't you have to change the ...
3 years, 7 months ago (2017-05-05 06:10:55 UTC) #23
lushnikov
https://codereview.chromium.org/2832943002/diff/80001/third_party/WebKit/LayoutTests/http/tests/inspector/bindings/resources/sourcemap-script.js File third_party/WebKit/LayoutTests/http/tests/inspector/bindings/resources/sourcemap-script.js (right): https://codereview.chromium.org/2832943002/diff/80001/third_party/WebKit/LayoutTests/http/tests/inspector/bindings/resources/sourcemap-script.js#newcode7 third_party/WebKit/LayoutTests/http/tests/inspector/bindings/resources/sourcemap-script.js:7: //# sourceMappingURL=sourcemap-script.js.map On 2017/05/05 06:10:54, dgozman wrote: > Don't ...
3 years, 7 months ago (2017-05-05 20:58:27 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2832943002/100001
3 years, 7 months ago (2017-05-05 21:25:32 UTC) #27
commit-bot: I haz the power
3 years, 7 months ago (2017-05-05 22:58:02 UTC) #30
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/50d089bc61f3dd1546a1a6f6267f...

Powered by Google App Engine
This is Rietveld 408576698