Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/io.js

Issue 5706475775197184: Issue 1602 - Fixed generator syntax mistakenly applied on outer function (Closed)
Patch Set: Created April 1, 2015, 9:40 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
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: lib/io.js
===================================================================
--- a/lib/io.js
+++ b/lib/io.js
@@ -69,7 +69,7 @@
* each line read and with a null parameter once the read operation is done.
* The callback will be called when the operation is done.
*/
- readFromFile: function*(/**nsIFile*/ file, /**Object*/ listener, /**Function*/ callback)
+ readFromFile: function(/**nsIFile*/ file, /**Object*/ listener, /**Function*/ callback)
{
try
{
@@ -150,7 +150,7 @@
};
let decoder = new TextDecoder();
- Task.spawn(function()
+ Task.spawn(function*()
{
if (firstRead && Services.vc.compare(Utils.platformVersion, "23.0a1") <= 0)
{
@@ -194,13 +194,13 @@
* Writes string data to a file in UTF-8 format asynchronously. The callback
* will be called when the write operation is done.
*/
- writeToFile: function*(/**nsIFile*/ file, /**Iterator*/ data, /**Function*/ callback)
+ writeToFile: function(/**nsIFile*/ file, /**Iterator*/ data, /**Function*/ callback)
{
try
{
let encoder = new TextEncoder();
- Task.spawn(function()
+ Task.spawn(function*()
{
// This mimics OS.File.writeAtomic() but writes in chunks.
let tmpPath = file.path + ".tmp";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld