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

Unified Diff: Source/devtools/front_end/network/NetworkPanel.js

Issue 1314783010: DevTools: fix race conditions while recording film strips (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use counter, not a flag to track reload suspension Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/bindings/TempFile.js ('k') | Source/devtools/front_end/sdk/ResourceTreeModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/network/NetworkPanel.js
diff --git a/Source/devtools/front_end/network/NetworkPanel.js b/Source/devtools/front_end/network/NetworkPanel.js
index c3b04e7339cc88b11478990d2ea3c227c7fc24e3..65fbb9accd3006386f0b864120f1de1a102a63cd 100644
--- a/Source/devtools/front_end/network/NetworkPanel.js
+++ b/Source/devtools/front_end/network/NetworkPanel.js
@@ -705,6 +705,9 @@ WebInspector.NetworkPanel.FilmStripRecorder.prototype = {
if (!this._tracingModel)
return;
this._tracingModel.tracingComplete();
+ var resourceTreeModel = this._target.resourceTreeModel;
+ this._target = null;
+ setImmediate(resourceTreeModel.resumeReload.bind(resourceTreeModel));
this._callback(new WebInspector.FilmStripModel(this._tracingModel, this._timeCalculator.minimumBoundary() * 1000));
delete this._callback;
},
@@ -726,6 +729,8 @@ WebInspector.NetworkPanel.FilmStripRecorder.prototype = {
startRecording: function()
{
+ this._filmStripView.reset();
+ this._filmStripView.setStatusText(WebInspector.UIString("Recording frames..."));
if (this._target)
return;
@@ -735,8 +740,6 @@ WebInspector.NetworkPanel.FilmStripRecorder.prototype = {
else
this._tracingModel = new WebInspector.TracingModel(new WebInspector.TempFileBackingStorage("tracing"));
this._target.tracingManager.start(this, "-*,disabled-by-default-devtools.screenshot", "");
- this._filmStripView.reset();
- this._filmStripView.setStatusText(WebInspector.UIString("Recording frames..."));
},
/**
@@ -756,7 +759,7 @@ WebInspector.NetworkPanel.FilmStripRecorder.prototype = {
return;
this._target.tracingManager.stop();
- this._target = null;
+ this._target.resourceTreeModel.suspendReload();
this._callback = callback;
this._filmStripView.setStatusText(WebInspector.UIString("Fetching frames..."));
}
« no previous file with comments | « Source/devtools/front_end/bindings/TempFile.js ('k') | Source/devtools/front_end/sdk/ResourceTreeModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698