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

Unified Diff: Source/devtools/front_end/bindings/TempFile.js

Issue 661063002: DevTools: wrong event was used as an indicator of finished write operation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | no next file » | 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 2857fc791f0b3a3c995699dee45a88ac9964cfa0..a9674a87f2ae9005f86aae2d7f3ea849e5940e1c 100644
--- a/Source/devtools/front_end/bindings/TempFile.js
+++ b/Source/devtools/front_end/bindings/TempFile.js
@@ -81,7 +81,7 @@ WebInspector.TempFile = function(dirPath, name, callback)
function didTruncate(e)
{
this._writer = writer;
- writer.onwrite = null;
+ writer.onwriteend = null;
writer.onerror = null;
callback(this);
}
@@ -93,7 +93,7 @@ WebInspector.TempFile = function(dirPath, name, callback)
}
if (writer.length) {
- writer.onwrite = didTruncate.bind(this);
+ writer.onwriteend = didTruncate.bind(this);
writer.onerror = onTruncateError;
writer.truncate(0);
} else {
@@ -128,10 +128,10 @@ WebInspector.TempFile.prototype = {
var blob = new Blob(strings, {type: 'text/plain'});
this._writer.onerror = function(e)
{
- WebInspector.console.error("Failed to write into a temp file: " + e.message);
+ WebInspector.console.error("Failed to write into a temp file: " + e.target.error.message);
callback(false);
}
- this._writer.onwrite = function(e)
+ this._writer.onwriteend = function(e)
{
callback(true);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698