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

Issue 1238103002: [DevTools] Do not report edited resources via Page.getResourceContent. (Closed)

Created:
5 years, 5 months ago by dgozman
Modified:
5 years, 4 months ago
Reviewers:
sergeyv, yurys, pfeldman
CC:
blink-reviews, caseq+blink_chromium.org, yurys+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, sergeyv+blink_chromium.org, kozyatinskiy+blink_chromium.org
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

[DevTools] Do not report edited resources via Page.getResourceContent. Instead of requesting scripts through Page.getResourceContent, we should use Debugger.getScriptSource or CSS.getStylesheetTest. NetworkProject already does that. A couple of race fixes along the way because of changed timings. BUG=none Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200585

Patch Set 1 #

Patch Set 2 : #

Total comments: 12

Patch Set 3 : Fixed yurys' comments #

Total comments: 2

Patch Set 4 : Fixed comment #

Total comments: 4

Patch Set 5 : Simplified #

Patch Set 6 : Updated test #

Patch Set 7 : Same for CSS #

Total comments: 10

Patch Set 8 : rebased #

Patch Set 9 : Nuked concatenated, fixed comments #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -494 lines) Patch
D LayoutTests/http/tests/inspector/search/search-in-concatenated-script.html View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -47 lines 0 comments Download
D LayoutTests/http/tests/inspector/search/search-in-concatenated-script-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -15 lines 0 comments Download
M LayoutTests/inspector/editor/text-editor-search-replace.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/inspector/editor/text-editor-search-switch-editor.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/inspector/sources/autocomplete-general.html View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
D LayoutTests/inspector/sources/debugger/content-providers.html View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -50 lines 0 comments Download
D LayoutTests/inspector/sources/debugger/content-providers-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -14 lines 0 comments Download
D LayoutTests/inspector/sources/debugger/network-uisourcecode-provider.html View 1 2 3 4 5 6 3 chunks +5 lines, -26 lines 3 comments Download
D LayoutTests/inspector/sources/debugger/network-uisourcecode-provider-expected.txt View 1 2 3 4 5 6 1 chunk +4 lines, -14 lines 2 comments Download
M LayoutTests/inspector/sources/debugger/resource-script-mapping-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
D LayoutTests/inspector/sources/resources/empty.js View 1 2 3 4 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/core/inspector/InspectorPageAgent.h View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download
M Source/core/inspector/InspectorPageAgent.cpp View 1 2 3 4 5 6 4 chunks +2 lines, -10 lines 0 comments Download
M Source/core/inspector/PageDebuggerAgent.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/inspector/PageDebuggerAgent.cpp View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/inspector/V8DebuggerAgent.h View 1 2 3 4 5 6 7 8 3 chunks +0 lines, -3 lines 0 comments Download
M Source/core/inspector/V8DebuggerAgent.cpp View 1 2 3 4 5 6 7 8 4 chunks +1 line, -21 lines 0 comments Download
M Source/devtools/front_end/bindings/DefaultScriptMapping.js View 1 2 3 4 5 6 7 8 1 chunk +1 line, -2 lines 0 comments Download
M Source/devtools/front_end/bindings/NetworkProject.js View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -113 lines 0 comments Download
M Source/devtools/front_end/bindings/ResourceScriptMapping.js View 1 2 3 4 5 6 7 8 2 chunks +15 lines, -0 lines 2 comments Download
M Source/devtools/front_end/sdk/ContentProviders.js View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -160 lines 0 comments Download
M Source/devtools/front_end/sdk/Resource.js View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -5 lines 2 comments Download
M Source/web/WebDevToolsAgentImpl.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 50 (12 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1238103002/20001
5 years, 5 months ago (2015-07-16 15:45:48 UTC) #2
dgozman
Could you please take a look?
5 years, 5 months ago (2015-07-16 15:46:01 UTC) #4
yurys
I like backend part. https://codereview.chromium.org/1238103002/diff/20001/LayoutTests/http/tests/inspector/workspace-test.js File LayoutTests/http/tests/inspector/workspace-test.js (right): https://codereview.chromium.org/1238103002/diff/20001/LayoutTests/http/tests/inspector/workspace-test.js#newcode14 LayoutTests/http/tests/inspector/workspace-test.js:14: WebInspector.NetworkProject.prototype._populate = restoreAfterCalledOnce; Please use ...
5 years, 5 months ago (2015-07-16 16:30:35 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-16 17:03:17 UTC) #7
dgozman
PTAL https://codereview.chromium.org/1238103002/diff/20001/LayoutTests/http/tests/inspector/workspace-test.js File LayoutTests/http/tests/inspector/workspace-test.js (right): https://codereview.chromium.org/1238103002/diff/20001/LayoutTests/http/tests/inspector/workspace-test.js#newcode14 LayoutTests/http/tests/inspector/workspace-test.js:14: WebInspector.NetworkProject.prototype._populate = restoreAfterCalledOnce; On 2015/07/16 16:30:35, yurys wrote: ...
5 years, 5 months ago (2015-07-17 14:39:16 UTC) #8
yurys
https://codereview.chromium.org/1238103002/diff/40001/Source/devtools/front_end/bindings/NetworkProject.js File Source/devtools/front_end/bindings/NetworkProject.js (right): https://codereview.chromium.org/1238103002/diff/40001/Source/devtools/front_end/bindings/NetworkProject.js#newcode499 Source/devtools/front_end/bindings/NetworkProject.js:499: else if (type === WebInspector.resourceTypes.Script) This branch is unreachable, ...
5 years, 5 months ago (2015-07-17 14:53:08 UTC) #9
dgozman
PTAL https://codereview.chromium.org/1238103002/diff/40001/Source/devtools/front_end/bindings/NetworkProject.js File Source/devtools/front_end/bindings/NetworkProject.js (right): https://codereview.chromium.org/1238103002/diff/40001/Source/devtools/front_end/bindings/NetworkProject.js#newcode499 Source/devtools/front_end/bindings/NetworkProject.js:499: else if (type === WebInspector.resourceTypes.Script) On 2015/07/17 14:53:08, ...
5 years, 5 months ago (2015-07-17 16:41:42 UTC) #10
yurys
lgtm
5 years, 5 months ago (2015-07-20 08:23:38 UTC) #11
sergeyv
https://codereview.chromium.org/1238103002/diff/60001/Source/devtools/front_end/bindings/NetworkProject.js File Source/devtools/front_end/bindings/NetworkProject.js (right): https://codereview.chromium.org/1238103002/diff/60001/Source/devtools/front_end/bindings/NetworkProject.js#newcode485 Source/devtools/front_end/bindings/NetworkProject.js:485: callback(content); Looks like you are going to have a ...
5 years, 5 months ago (2015-07-20 08:40:59 UTC) #12
sergeyv
https://codereview.chromium.org/1238103002/diff/60001/Source/devtools/front_end/bindings/NetworkProject.js File Source/devtools/front_end/bindings/NetworkProject.js (right): https://codereview.chromium.org/1238103002/diff/60001/Source/devtools/front_end/bindings/NetworkProject.js#newcode485 Source/devtools/front_end/bindings/NetworkProject.js:485: callback(content); On 2015/07/20 08:40:58, sergeyv wrote: > Looks like ...
5 years, 5 months ago (2015-07-20 08:45:56 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1238103002/60001
5 years, 5 months ago (2015-07-20 09:18:11 UTC) #15
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://src.chromium.org/viewvc/blink?view=rev&revision=199161
5 years, 5 months ago (2015-07-20 10:40:26 UTC) #16
pfeldman
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/1240373002/ by pfeldman@chromium.org. ...
5 years, 5 months ago (2015-07-20 17:47:56 UTC) #17
dgozman
On 2015/07/20 17:47:56, pfeldman wrote: > A revert of this CL (patchset #4 id:60001) has ...
5 years, 5 months ago (2015-07-20 18:05:26 UTC) #18
pfeldman
On 2015/07/20 18:05:26, dgozman wrote: > On 2015/07/20 17:47:56, pfeldman wrote: > > A revert ...
5 years, 5 months ago (2015-07-20 18:16:33 UTC) #19
dgozman
On 2015/07/20 18:16:33, pfeldman wrote: > On 2015/07/20 18:05:26, dgozman wrote: > > On 2015/07/20 ...
5 years, 5 months ago (2015-07-20 18:25:39 UTC) #20
pfeldman
As I said in the revert comment, extensions API is a concern.
5 years, 5 months ago (2015-07-20 18:30:15 UTC) #21
yurys
On 2015/07/20 18:30:15, pfeldman wrote: > As I said in the revert comment, extensions API ...
5 years, 5 months ago (2015-07-21 08:43:44 UTC) #22
dgozman
On 2015/07/21 08:43:44, yurys wrote: > On 2015/07/20 18:30:15, pfeldman wrote: > > As I ...
5 years, 5 months ago (2015-07-21 09:33:46 UTC) #23
pfeldman
https://codereview.chromium.org/1238103002/diff/60001/Source/core/inspector/InspectorPageAgent.cpp File Source/core/inspector/InspectorPageAgent.cpp (right): https://codereview.chromium.org/1238103002/diff/60001/Source/core/inspector/InspectorPageAgent.cpp#newcode532 Source/core/inspector/InspectorPageAgent.cpp:532: if (m_cssAgent->getEditedStyleSheet(url, &content)) { Could you explain why we ...
5 years, 5 months ago (2015-07-22 04:16:15 UTC) #24
yurys
On 2015/07/22 04:16:15, pfeldman wrote: > https://codereview.chromium.org/1238103002/diff/60001/Source/core/inspector/InspectorPageAgent.cpp > File Source/core/inspector/InspectorPageAgent.cpp (right): > > https://codereview.chromium.org/1238103002/diff/60001/Source/core/inspector/InspectorPageAgent.cpp#newcode532 > ...
5 years, 5 months ago (2015-07-22 08:09:02 UTC) #25
pfeldman
I think we need a VC to discuss it since I am not sure you ...
5 years, 5 months ago (2015-07-24 16:50:51 UTC) #26
pfeldman
As I understand it currently, this is not lgtm
5 years, 5 months ago (2015-07-24 16:55:32 UTC) #27
dgozman
Pavel, PTAL.
5 years, 4 months ago (2015-08-11 22:15:10 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1238103002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1238103002/120001
5 years, 4 months ago (2015-08-11 22:15:13 UTC) #30
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/74860)
5 years, 4 months ago (2015-08-11 22:17:36 UTC) #32
pfeldman
https://codereview.chromium.org/1238103002/diff/120001/Source/devtools/front_end/bindings/NetworkProject.js File Source/devtools/front_end/bindings/NetworkProject.js (right): https://codereview.chromium.org/1238103002/diff/120001/Source/devtools/front_end/bindings/NetworkProject.js#newcode252 Source/devtools/front_end/bindings/NetworkProject.js:252: return resource.resourceType() === WebInspector.resourceTypes.Document ? new WebInspector.NetworkProject.DocumentFallbackResource(resource) : resource; ...
5 years, 4 months ago (2015-08-11 23:22:43 UTC) #33
dgozman
PTAL https://codereview.chromium.org/1238103002/diff/120001/Source/devtools/front_end/bindings/NetworkProject.js File Source/devtools/front_end/bindings/NetworkProject.js (right): https://codereview.chromium.org/1238103002/diff/120001/Source/devtools/front_end/bindings/NetworkProject.js#newcode252 Source/devtools/front_end/bindings/NetworkProject.js:252: return resource.resourceType() === WebInspector.resourceTypes.Document ? new WebInspector.NetworkProject.DocumentFallbackResource(resource) : ...
5 years, 4 months ago (2015-08-12 23:22:12 UTC) #34
pfeldman
https://codereview.chromium.org/1238103002/diff/160001/LayoutTests/inspector/sources/debugger/network-uisourcecode-provider-expected.txt File LayoutTests/inspector/sources/debugger/network-uisourcecode-provider-expected.txt (left): https://codereview.chromium.org/1238103002/diff/160001/LayoutTests/inspector/sources/debugger/network-uisourcecode-provider-expected.txt#oldcode11 LayoutTests/inspector/sources/debugger/network-uisourcecode-provider-expected.txt:11: Running: testScriptResource Why did the expectations change? Your change ...
5 years, 4 months ago (2015-08-12 23:38:42 UTC) #35
dgozman
https://codereview.chromium.org/1238103002/diff/160001/LayoutTests/inspector/sources/debugger/network-uisourcecode-provider-expected.txt File LayoutTests/inspector/sources/debugger/network-uisourcecode-provider-expected.txt (left): https://codereview.chromium.org/1238103002/diff/160001/LayoutTests/inspector/sources/debugger/network-uisourcecode-provider-expected.txt#oldcode11 LayoutTests/inspector/sources/debugger/network-uisourcecode-provider-expected.txt:11: Running: testScriptResource On 2015/08/12 23:38:42, pfeldman wrote: > Why ...
5 years, 4 months ago (2015-08-13 18:27:26 UTC) #36
pfeldman
https://codereview.chromium.org/1238103002/diff/160001/LayoutTests/inspector/sources/debugger/network-uisourcecode-provider.html File LayoutTests/inspector/sources/debugger/network-uisourcecode-provider.html (left): https://codereview.chromium.org/1238103002/diff/160001/LayoutTests/inspector/sources/debugger/network-uisourcecode-provider.html#oldcode116 LayoutTests/inspector/sources/debugger/network-uisourcecode-provider.html:116: function testStylesheetResource(next) On 2015/08/13 18:27:26, dgozman wrote: > On ...
5 years, 4 months ago (2015-08-13 19:22:33 UTC) #37
pfeldman
lgtm
5 years, 4 months ago (2015-08-13 19:32:11 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1238103002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1238103002/160001
5 years, 4 months ago (2015-08-13 19:33:57 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/92867)
5 years, 4 months ago (2015-08-13 22:12:32 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1238103002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1238103002/160001
5 years, 4 months ago (2015-08-13 22:31:06 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/92981)
5 years, 4 months ago (2015-08-14 00:20:29 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1238103002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1238103002/160001
5 years, 4 months ago (2015-08-14 23:57:06 UTC) #49
commit-bot: I haz the power
5 years, 4 months ago (2015-08-15 01:04:39 UTC) #50
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=200585

Powered by Google App Engine
This is Rietveld 408576698