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

Issue 2588503002: DevTools: Cache the original content on UISourceCode (Closed)

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

Description

DevTools: Cache the original content on UISourceCode Previously, requestOriginalContent fetched the content from the filesystem. If the user saves changes to the file system, then it is no longer the original content. BUG=none

Patch Set 1 #

Total comments: 4

Patch Set 2 : cache on requestOriginal and commit #

Patch Set 3 : Merge #

Patch Set 4 : Emit the event synchronously #

Patch Set 5 : Don't modify test #

Total comments: 2

Patch Set 6 : Move logic to the project level #

Total comments: 2

Messages

Total messages: 8 (3 generated)
einbinder
ptal https://codereview.chromium.org/2588503002/diff/1/third_party/WebKit/LayoutTests/inspector/uisourcecode-revisions.html File third_party/WebKit/LayoutTests/inspector/uisourcecode-revisions.html (right): https://codereview.chromium.org/2588503002/diff/1/third_party/WebKit/LayoutTests/inspector/uisourcecode-revisions.html#newcode41 third_party/WebKit/LayoutTests/inspector/uisourcecode-revisions.html:41: uiSourceCode.requestContent().then( () => { We need to signal ...
4 years ago (2016-12-16 23:43:00 UTC) #2
lushnikov
https://codereview.chromium.org/2588503002/diff/1/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js File third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js (right): https://codereview.chromium.org/2588503002/diff/1/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js#newcode306 third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js:306: this._setContent(content); why do you want to link original content ...
4 years ago (2016-12-17 00:10:51 UTC) #3
einbinder
ptal https://codereview.chromium.org/2588503002/diff/1/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js File third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js (right): https://codereview.chromium.org/2588503002/diff/1/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js#newcode306 third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js:306: this._setContent(content); On 2016/12/17 at 00:10:51, lushnikov wrote: > ...
4 years ago (2016-12-20 00:56:55 UTC) #6
lushnikov
https://codereview.chromium.org/2588503002/diff/80001/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js File third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js (right): https://codereview.chromium.org/2588503002/diff/80001/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js#newcode308 third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js:308: this.requestOriginalContent().then(() => this._project.setFileContent(this, content, function() {})); this should be ...
4 years ago (2016-12-20 01:05:23 UTC) #7
einbinder
4 years ago (2016-12-20 03:10:34 UTC) #8
Moved the caching logic in the projects.

https://codereview.chromium.org/2588503002/diff/100001/third_party/WebKit/Sou...
File
third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js
(left):

https://codereview.chromium.org/2588503002/diff/100001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js:299:
* @param {function(?string)} callback
The parameter in the callback was never used.

https://codereview.chromium.org/2588503002/diff/100001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js:303:
this._fileSystem.setFileContent(filePath, newContent, callback.bind(this, ''));
Bind the callback to this?! What is going on.

Powered by Google App Engine
This is Rietveld 408576698