cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From daserge <>
Subject [GitHub] cordova-plugin-file pull request: CB-10960 Uncaught #<FileError> i...
Date Fri, 08 Apr 2016 06:14:02 GMT
Github user daserge commented on a diff in the pull request:
    --- Diff: www/FileWriter.js ---
    @@ -107,8 +108,29 @@ FileWriter.prototype.write = function(data) {
             var fileReader = new FileReader();
             fileReader.onload = function() {
                 // Call this method again, with the arraybuffer as argument
    -  , this.result);
    +  , this.result, true /* isPendingBlobReadResult
    +        fileReader.onerror = function (evt) {
    +            // DONE state
    +            that.readyState = FileWriter.DONE;
    --- End diff --
    I don't think so as the `DONE` state is being set in `FileReader.readSuccessCallback`,
`FileReader.readFailureCallback` and `FileReader.abort` only.
    `abort` should not be called outside (and we don't call it) taking into account that fileReader
is an internal variable, `readSuccessCallback` calls `onload` and `readFailureCallback` calls
`onerror` so we are covering all the cases.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message