Commit 7c02543f authored by Alexey Kozyatinskiy's avatar Alexey Kozyatinskiy Committed by Commit Bot

[DevTools] not run WorkspaceDiff on files with more then 1024*1024 lines

R=lushnikov@chromium.org

Bug: chromium:763752
Change-Id: I002ac8a40cc6a21949a51d926c1c22ddd8b23fc0
Reviewed-on: https://chromium-review.googlesource.com/728731
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Reviewed-by: default avatarAndrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510261}
parent c2cecaab
...@@ -223,12 +223,14 @@ WorkspaceDiff.WorkspaceDiff.UISourceCodeDiff = class extends Common.Object { ...@@ -223,12 +223,14 @@ WorkspaceDiff.WorkspaceDiff.UISourceCodeDiff = class extends Common.Object {
var current = this._uiSourceCode.workingCopy(); var current = this._uiSourceCode.workingCopy();
if (!current && !this._uiSourceCode.contentLoaded()) if (!current && !this._uiSourceCode.contentLoaded())
current = await this._uiSourceCode.requestContent(); current = await this._uiSourceCode.requestContent();
// ------------ ASYNC ------------ if (current.length > 1024 * 1024)
return null;
if (this._dispose) if (this._dispose)
return null; return null;
var baseline = await this._uiSourceCode.requestOriginalContent(); var baseline = await this._uiSourceCode.requestOriginalContent();
// ------------ ASYNC ------------ if (baseline.length > 1024 * 1024)
return null;
if (this._dispose) if (this._dispose)
return null; return null;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment