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

Issue 2542073002: DevTools: [Persistence] validate persistence binding. (Closed)

Created:
4 years ago by lushnikov
Modified:
4 years 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/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: [Persistence] validate persistence binding. This patch ensures that persistence binding is not established if working copy of network UISourceCode does not match with the working copy of filesystem UISourceCode. This validation is done proactively: whenever automapping reports a binding, we fetch contents of both network and filesystem UISourceCodes and compare them. For this to work fast, we do *not* validate the following types of bindings: - bindings of source map sources. These could be slow to fetch, and they don't break us in any way. - bindings of binary files (e.g. images). These are never going to be edited, and thus can't deal any harm. To sum up, we request contents only of those text resources which were already succesfully loaded by the website itself, which means they are of manageble size. However, to be on the safe side, this change is guarded by on-by-default experiment. BUG=649837 R=dgozman Committed: https://crrev.com/7b5206fba773fc4f5ce4ba32691fd825a9eed17a Cr-Commit-Position: refs/heads/master@{#437761}

Patch Set 1 #

Patch Set 2 : cleanup #

Patch Set 3 : add etst #

Total comments: 7

Patch Set 4 : total validation #

Patch Set 5 : total safety. #

Patch Set 6 : validate network bindings #

Patch Set 7 : remove leftover #

Patch Set 8 : revert test changes #

Total comments: 3

Patch Set 9 : address comments #

Patch Set 10 : skip binding validation in case of non-text type of filesystem #

Patch Set 11 : rebaseline tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -128 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/inspector/file-system-project-mapping.html View 1 2 3 4 5 6 7 8 9 10 4 chunks +9 lines, -65 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/file-system-project-mapping-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -17 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-do-not-bind-dirty-sourcecode.html View 1 2 1 chunk +6 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-do-not-bind-dirty-sourcecode-expected.txt View 1 chunk +5 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-merge-editor-tabs.html View 1 2 2 chunks +2 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-merge-editor-tabs-expected.txt View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sync-content-nodejs.html View 1 2 3 4 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sync-content-nodejs-expected.txt View 1 2 3 4 chunks +0 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-test.js View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/sources/debugger/file-system-project-live-edit.html View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/main/Main.js View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js View 1 2 3 4 5 6 7 8 9 6 chunks +57 lines, -11 lines 0 comments Download

Messages

Total messages: 51 (32 generated)
lushnikov
please, take a look
4 years ago (2016-12-01 20:00:02 UTC) #1
lushnikov
please, take a look!
4 years ago (2016-12-07 01:11:26 UTC) #3
dgozman
lgtm https://codereview.chromium.org/2542073002/diff/40001/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-validate-binding-on-content-loaded-expected.txt File third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-validate-binding-on-content-loaded-expected.txt (right): https://codereview.chromium.org/2542073002/diff/40001/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-validate-binding-on-content-loaded-expected.txt#newcode11 third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-validate-binding-on-content-loaded-expected.txt:11: Running: openFileSystemTab Let's also test that network.requestContent() does ...
4 years ago (2016-12-07 01:45:42 UTC) #6
lushnikov
this is a total rewrite according to our discussion. Please, take a look!
4 years ago (2016-12-08 05:22:36 UTC) #10
dgozman
lgtm https://codereview.chromium.org/2542073002/diff/140001/third_party/WebKit/Source/devtools/front_end/main/Main.js File third_party/WebKit/Source/devtools/front_end/main/Main.js (right): https://codereview.chromium.org/2542073002/diff/140001/third_party/WebKit/Source/devtools/front_end/main/Main.js#newcode107 third_party/WebKit/Source/devtools/front_end/main/Main.js:107: Runtime.experiments.register('persistenceValidation', 'Validate persistence bindings'); You should manage to ...
4 years ago (2016-12-08 22:38:53 UTC) #11
lushnikov
thanks! https://codereview.chromium.org/2542073002/diff/140001/third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js File third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js (right): https://codereview.chromium.org/2542073002/diff/140001/third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js#newcode104 third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js:104: if (!binding.network[Persistence.Persistence._binding] || !binding.fileSystem[Persistence.Persistence._binding]) On 2016/12/08 22:38:53, dgozman ...
4 years ago (2016-12-08 23:02:24 UTC) #12
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/2542073002/160001
4 years ago (2016-12-08 23:03:11 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/350911)
4 years ago (2016-12-08 23:14:13 UTC) #17
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/2542073002/160001
4 years ago (2016-12-08 23:38:37 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/350974)
4 years ago (2016-12-08 23:44:56 UTC) #21
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/2542073002/160001
4 years ago (2016-12-09 00:24:14 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/352983)
4 years ago (2016-12-09 02:28:46 UTC) #31
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/2542073002/180001
4 years ago (2016-12-09 02:45:58 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/353071)
4 years ago (2016-12-09 04:04:38 UTC) #35
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/2542073002/180001
4 years ago (2016-12-09 05:14:41 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/353135)
4 years ago (2016-12-09 06:26:28 UTC) #39
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/2542073002/200001
4 years ago (2016-12-10 06:34:30 UTC) #46
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years ago (2016-12-10 06:40:51 UTC) #49
commit-bot: I haz the power
4 years ago (2016-12-12 15:06:43 UTC) #51
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/7b5206fba773fc4f5ce4ba32691fd825a9eed17a
Cr-Commit-Position: refs/heads/master@{#437761}

Powered by Google App Engine
This is Rietveld 408576698