You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by kn...@apache.org on 2019/03/08 06:46:45 UTC

[cordova-plugin-file] branch travis_tests updated: add debug logs

This is an automated email from the ASF dual-hosted git repository.

knaito pushed a commit to branch travis_tests
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-file.git


The following commit(s) were added to refs/heads/travis_tests by this push:
     new 9db7630  add debug logs
9db7630 is described below

commit 9db7630290dfdd0c6e696649d6f20beb30f962d9
Author: knaito <kn...@asial.co.jp>
AuthorDate: Fri Mar 8 15:46:23 2019 +0900

    add debug logs
---
 src/browser/FileProxy.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/browser/FileProxy.js b/src/browser/FileProxy.js
index a88f0f7..8d11023 100644
--- a/src/browser/FileProxy.js
+++ b/src/browser/FileProxy.js
@@ -87,6 +87,7 @@
             // on browser implementation and can't be set up by user
             var size = args[1]; // eslint-disable-line no-unused-vars
 
+            window.customLog('log', 'requestFileSystem is called with type = ' + type);
             if (type !== LocalFileSystem.TEMPORARY && type !== LocalFileSystem.PERSISTENT) {
                 if (errorCallback) {
                     errorCallback(FileError.INVALID_MODIFICATION_ERR);
@@ -100,6 +101,7 @@
             var root = new DirectoryEntry('', DIR_SEPARATOR);
             fs_ = new FileSystem(name, root);
 
+            window.customLog('log', 'requestFileSystem step 2 ');
             idb_.open(storageName, function () {
                 successCallback(fs_);
             }, errorCallback);
@@ -809,9 +811,15 @@
             var self = this;
 
             // TODO: FF 12.0a1 isn't liking a db name with : in it.
+            window.customLog('log', 'idb_.open is called');
             var request = indexedDB.open(dbName.replace(':', '_')/*, 1 /*version */);
 
-            request.onerror = errorCallback || onError;
+            // request.onerror = errorCallback || onError;
+            request.onerror = function (err) {
+                window.customLog('log', 'request onerror is fired');
+                window.customLog('log', err);
+                (errorCallback || onError)(err);
+            };
 
             request.onupgradeneeded = function (e) {
                 // First open was called or higher db version was used.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org