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

Issue 2124203002: DevTools: copy protocol files to front-end to fix hosted mode (Closed)

Created:
4 years, 5 months ago by lushnikov
Modified:
4 years, 5 months ago
Reviewers:
dgozman, pfeldman
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, sergeyv+blink_chromium.org, pfeldman, kozyatinskiy+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: copy protocol files to front-end to fix hosted mode DevTools "hosted mode" is broken in a multiple ways: - it uses sync XHR from inside the microtask (this was recentrly forbidden) - as the protocol was split and moved around, the InspectorBackendHostedMode.js is not able to generate proper inspector backend commands The patch fixes both problems. Here we: - manually copy browser_protocol.json and js_protocol.json to the front-end folder so that hosted mode can rely on it - preload protocol files into Runtime.cachedResources in hosted mode for future use of InspectorBackendHostedMode.js BUG=623602 R=dgozman, pfeldman Committed: https://crrev.com/72620f081343cac603df3e17dfbd8b2607e2ab2d Cr-Commit-Position: refs/heads/master@{#404447}

Patch Set 1 #

Patch Set 2 : nit #

Total comments: 15

Patch Set 3 : address comments #

Total comments: 1

Patch Set 4 : pre-load json files for hosted mode #

Total comments: 4

Patch Set 5 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -26 lines) Patch
M third_party/WebKit/Source/devtools/front_end/Runtime.js View 1 2 3 4 2 chunks +25 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/inspector.js View 1 2 3 4 1 chunk +10 lines, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackendHostedMode.js View 1 2 3 4 2 chunks +9 lines, -12 lines 0 comments Download
A third_party/WebKit/Source/devtools/front_end/sdk/protocol/README.md View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/devtools/front_end/sdk/protocol/browser_protocol.json View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/WebKit/Source/devtools/front_end/sdk/protocol/js_protocol.json View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
M third_party/WebKit/Source/devtools/protocol.json View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 21 (8 generated)
lushnikov
please, take a look
4 years, 5 months ago (2016-07-07 02:04:49 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2124203002/20001
4 years, 5 months ago (2016-07-07 02:06:38 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/213303)
4 years, 5 months ago (2016-07-07 02:16:29 UTC) #6
pfeldman
https://codereview.chromium.org/2124203002/diff/20001/third_party/WebKit/Source/devtools/front_end/Runtime.js File third_party/WebKit/Source/devtools/front_end/Runtime.js (right): https://codereview.chromium.org/2124203002/diff/20001/third_party/WebKit/Source/devtools/front_end/Runtime.js#newcode151 third_party/WebKit/Source/devtools/front_end/Runtime.js:151: // Eval scripts as fast as possible. optional: We ...
4 years, 5 months ago (2016-07-07 04:13:34 UTC) #7
dgozman
https://codereview.chromium.org/2124203002/diff/20001/third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackendHostedMode.js File third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackendHostedMode.js (right): https://codereview.chromium.org/2124203002/diff/20001/third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackendHostedMode.js#newcode18 third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackendHostedMode.js:18: self.runtime.onAsyncEvalCompletion = Promise.all(promises); Can we fetch the json even ...
4 years, 5 months ago (2016-07-07 19:39:24 UTC) #8
lushnikov
https://codereview.chromium.org/2124203002/diff/20001/third_party/WebKit/Source/devtools/front_end/Runtime.js File third_party/WebKit/Source/devtools/front_end/Runtime.js (right): https://codereview.chromium.org/2124203002/diff/20001/third_party/WebKit/Source/devtools/front_end/Runtime.js#newcode151 third_party/WebKit/Source/devtools/front_end/Runtime.js:151: // Eval scripts as fast as possible. On 2016/07/07 ...
4 years, 5 months ago (2016-07-07 21:26:23 UTC) #9
pfeldman
lgtm % comment https://codereview.chromium.org/2124203002/diff/40001/third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackendHostedMode.js File third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackendHostedMode.js (right): https://codereview.chromium.org/2124203002/diff/40001/third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackendHostedMode.js#newcode28 third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackendHostedMode.js:28: .then(response => response.text()) I consider this ...
4 years, 5 months ago (2016-07-07 23:25:44 UTC) #10
lushnikov
A new approach, implementing the @dgozman suggestion. The Runtime.cachedResources came handy! And overall, this looks ...
4 years, 5 months ago (2016-07-08 02:32:10 UTC) #11
dgozman
lgtm https://codereview.chromium.org/2124203002/diff/60001/third_party/WebKit/Source/devtools/front_end/Runtime.js File third_party/WebKit/Source/devtools/front_end/Runtime.js (right): https://codereview.chromium.org/2124203002/diff/60001/third_party/WebKit/Source/devtools/front_end/Runtime.js#newcode218 third_party/WebKit/Source/devtools/front_end/Runtime.js:218: * @param {boolean=} doNotAddSourceURL Let's make it non-optional ...
4 years, 5 months ago (2016-07-08 05:45:07 UTC) #13
lushnikov
https://codereview.chromium.org/2124203002/diff/60001/third_party/WebKit/Source/devtools/front_end/Runtime.js File third_party/WebKit/Source/devtools/front_end/Runtime.js (right): https://codereview.chromium.org/2124203002/diff/60001/third_party/WebKit/Source/devtools/front_end/Runtime.js#newcode218 third_party/WebKit/Source/devtools/front_end/Runtime.js:218: * @param {boolean=} doNotAddSourceURL On 2016/07/08 05:45:07, dgozman wrote: ...
4 years, 5 months ago (2016-07-08 17:09:53 UTC) #14
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/2124203002/80001
4 years, 5 months ago (2016-07-08 17:10:23 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 5 months ago (2016-07-08 18:28:28 UTC) #19
commit-bot: I haz the power
4 years, 5 months ago (2016-07-08 18:29:54 UTC) #21
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/72620f081343cac603df3e17dfbd8b2607e2ab2d
Cr-Commit-Position: refs/heads/master@{#404447}

Powered by Google App Engine
This is Rietveld 408576698