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)); |