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

Issue 2784413003: DevTools: carefully cleanup javascript sourcemaps (Closed)

Created:
3 years, 8 months ago by lushnikov
Modified:
3 years, 8 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: carefully cleanup javascript sourcemaps This patch starts to detach JavaScript sourcemaps as the associated scripts go away (e.g. parent frame got detached). This patch makes javascript sourcemap management similar to CSS domain: - debuggerModel now has sourceMapManager - CompilerScriptMapping listens only to SourceMapManager events A few key differences arose: - We make sure that there's only one sourceMap per (executionContext, script.sourceURL, script.sourceMapURL). This is to support "browsersync" scenario and "hot script reload". - Since CompilerScriptMapping has a need for stubProjects, SourceMapManager is taught to send SourceMapWillAttach and SourceMapFailedToAttach events. BUG=670180, 685552 R=dgozman Review-Url: https://codereview.chromium.org/2784413003 Cr-Commit-Position: refs/heads/master@{#461303} Committed: https://chromium.googlesource.com/chromium/src/+/625244e25254fb6479b3122d92145c596616a196

Patch Set 1 #

Total comments: 26

Patch Set 2 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+315 lines, -237 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/inspector/bindings/sourcemap-bindings-multiple-frames-expected.txt View 4 chunks +7 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/bindings/sourcemap-navigator-multiple-frames-expected.txt View 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/compiler-script-mapping.html View 1 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/sources/debugger/worker-debugging-script-mapping.html View 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/sources/js-sourcemaps-toggle-enabled.html View 1 1 chunk +45 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/sources/js-sourcemaps-toggle-enabled-expected.txt View 1 1 chunk +35 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/sources/resources/sourcemap-script.js View 1 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/sources/resources/sourcemap-script.js.map View 1 1 chunk +8 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/sources/resources/sourcemap-typescript.ts View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.js View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js View 1 6 chunks +107 lines, -206 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js View 2 chunks +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/platform/utilities.js View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js View 1 7 chunks +77 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/Script.js View 3 chunks +2 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/SourceMapManager.js View 1 4 chunks +12 lines, -2 lines 0 comments Download

Messages

Total messages: 25 (20 generated)
lushnikov
please, take a look
3 years, 8 months ago (2017-03-30 23:52:16 UTC) #1
dgozman
Let's add a test for jsSourceMapsEnabled. lgtm https://codereview.chromium.org/2784413003/diff/1/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js File third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js (right): https://codereview.chromium.org/2784413003/diff/1/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js#newcode114 third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js:114: var sourceMap ...
3 years, 8 months ago (2017-03-31 21:57:41 UTC) #12
lushnikov
https://codereview.chromium.org/2784413003/diff/1/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js File third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js (right): https://codereview.chromium.org/2784413003/diff/1/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js#newcode114 third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js:114: var sourceMap = this._sourceMapManager.sourceMapForClient(script); On 2017/03/31 21:57:40, dgozman wrote: ...
3 years, 8 months ago (2017-03-31 23:53:10 UTC) #16
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/2784413003/80001
3 years, 8 months ago (2017-03-31 23:54:35 UTC) #22
commit-bot: I haz the power
3 years, 8 months ago (2017-04-01 01:38:46 UTC) #25
Message was sent while issue was closed.
Committed patchset #2 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/625244e25254fb6479b3122d9214...

Powered by Google App Engine
This is Rietveld 408576698