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

Unified Diff: Source/devtools/front_end/bindings/TempFile.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 | « no previous file | Source/devtools/front_end/network/NetworkPanel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/bindings/TempFile.js
diff --git a/Source/devtools/front_end/bindings/TempFile.js b/Source/devtools/front_end/bindings/TempFile.js
index d9030a9aa0b66f44e9773aafdac699855a1c0ad3..60334c47fa26fb3897152b5dd129eb406cdba642 100644
--- a/Source/devtools/front_end/bindings/TempFile.js
+++ b/Source/devtools/front_end/bindings/TempFile.js
@@ -298,6 +298,9 @@ WebInspector.DeferredTempFile.prototype = {
_writeNextChunk: function()
{
+ // File was deleted while create or write was in-flight.
+ if (!this._tempFile)
+ return;
var chunk = this._chunks.shift();
this._isWriting = true;
this._tempFile.write(/** @type {!Array.<string>} */(chunk.strings), this._didWriteChunk.bind(this, chunk.callback));
« no previous file with comments | « no previous file | Source/devtools/front_end/network/NetworkPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698