You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2015/03/26 23:09:49 UTC
[1/3] cordova-firefoxos git commit: Set VERSION to 3.8.0-dev (via
coho)
Repository: cordova-firefoxos
Updated Branches:
refs/heads/master bd21ce3b0 -> f35e468fa
Set VERSION to 3.8.0-dev (via coho)
Project: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/commit/da435ed5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/tree/da435ed5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/diff/da435ed5
Branch: refs/heads/master
Commit: da435ed5596c7079233a949eaee95ab8b92072fa
Parents: bd21ce3
Author: Steve Gill <st...@gmail.com>
Authored: Thu Mar 26 14:34:45 2015 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Mar 26 14:34:45 2015 -0700
----------------------------------------------------------------------
VERSION | 2 +-
bin/templates/project/cordova/version | 2 +-
package.json | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/da435ed5/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
index a4ce38e..d4da33b 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.7.0-dev
+3.8.0-dev
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/da435ed5/bin/templates/project/cordova/version
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/version b/bin/templates/project/cordova/version
index 2e1ade7..e6acd80 100755
--- a/bin/templates/project/cordova/version
+++ b/bin/templates/project/cordova/version
@@ -20,6 +20,6 @@
*/
// Coho updates this line:
-var VERSION = "3.7.0-dev";
+var VERSION = "3.8.0-dev";
console.log(VERSION);
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/da435ed5/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 576fb97..393dbf6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "cordova-firefoxos",
- "version": "3.7.0-dev",
+ "version": "3.8.0-dev",
"description": "cordova-firefoxos release",
"main": "bin/create",
"repository": {
@@ -36,4 +36,4 @@
}
],
"license": "Apache Version 2.0"
-}
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[3/3] cordova-firefoxos git commit: added ecosystem:cordova keyword
Posted by st...@apache.org.
added ecosystem:cordova keyword
Project: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/commit/f35e468f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/tree/f35e468f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/diff/f35e468f
Branch: refs/heads/master
Commit: f35e468fabd706903c6a1b560e57fdcefbf29ea0
Parents: 5c30753
Author: Steve Gill <st...@gmail.com>
Authored: Thu Mar 26 15:08:26 2015 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Mar 26 15:08:26 2015 -0700
----------------------------------------------------------------------
package.json | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/f35e468f/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 393dbf6..f04bbfe 100644
--- a/package.json
+++ b/package.json
@@ -10,7 +10,8 @@
"keywords": [
"cordova",
"firefoxos",
- "apache"
+ "apache",
+ "ecosystem:cordova"
],
"dependencies": {
"archiver": "^0.14.3",
@@ -36,4 +37,4 @@
}
],
"license": "Apache Version 2.0"
-}
\ No newline at end of file
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[2/3] cordova-firefoxos git commit: Update JS snapshot to version
3.8.0-dev (via coho)
Posted by st...@apache.org.
Update JS snapshot to version 3.8.0-dev (via coho)
Project: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/commit/5c307530
Tree: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/tree/5c307530
Diff: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/diff/5c307530
Branch: refs/heads/master
Commit: 5c3075300db0365814e8be371f91ee1ba9bfe552
Parents: da435ed
Author: Steve Gill <st...@gmail.com>
Authored: Thu Mar 26 14:34:46 2015 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Mar 26 14:34:46 2015 -0700
----------------------------------------------------------------------
cordova-lib/cordova.js | 90 +++++++++++++++++++++++++--------------------
1 file changed, 50 insertions(+), 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/5c307530/cordova-lib/cordova.js
----------------------------------------------------------------------
diff --git a/cordova-lib/cordova.js b/cordova-lib/cordova.js
index 8920463..8c0345a 100644
--- a/cordova-lib/cordova.js
+++ b/cordova-lib/cordova.js
@@ -1,5 +1,5 @@
// Platform: firefoxos
-// 3.7.0-dev-1258511
+// b4af1c5ec477dd98cd651932ea6df6d46705d7f9
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -19,7 +19,7 @@
under the License.
*/
;(function() {
-var CORDOVA_JS_BUILD_LABEL = '3.7.0-dev-1258511';
+var PLATFORM_VERSION_BUILD_LABEL = '3.8.0-dev';
// file: src/scripts/require.js
/*jshint -W079 */
@@ -101,6 +101,8 @@ if (typeof module === "object" && typeof require === "function") {
// file: src/cordova.js
define("cordova", function(require, exports, module) {
+if ("cordova" in window) { throw new Error("cordova already defined"); };
+
var channel = require('cordova/channel');
var platform = require('cordova/platform');
@@ -175,7 +177,8 @@ function createEvent(type, data) {
var cordova = {
define:define,
require:require,
- version:CORDOVA_JS_BUILD_LABEL,
+ version:PLATFORM_VERSION_BUILD_LABEL,
+ platformVersion:PLATFORM_VERSION_BUILD_LABEL,
platformId:platform.id,
/**
* Methods to add/remove your own addEventListener hijacking on document + window.
@@ -262,11 +265,7 @@ var cordova = {
* Called by native code when returning successful result from an action.
*/
callbackSuccess: function(callbackId, args) {
- try {
- cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);
- } catch (e) {
- console.log("Error in success callback: " + callbackId + " = "+e);
- }
+ cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);
},
/**
@@ -275,30 +274,40 @@ var cordova = {
callbackError: function(callbackId, args) {
// TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.
// Derive success from status.
- try {
- cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);
- } catch (e) {
- console.log("Error in error callback: " + callbackId + " = "+e);
- }
+ cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);
},
/**
* Called by native code when returning the result from an action.
*/
- callbackFromNative: function(callbackId, success, status, args, keepCallback) {
- var callback = cordova.callbacks[callbackId];
- if (callback) {
- if (success && status == cordova.callbackStatus.OK) {
- callback.success && callback.success.apply(null, args);
- } else if (!success) {
- callback.fail && callback.fail.apply(null, args);
- }
-
- // Clear callback if not expecting any more results
- if (!keepCallback) {
- delete cordova.callbacks[callbackId];
+ callbackFromNative: function(callbackId, isSuccess, status, args, keepCallback) {
+ try {
+ var callback = cordova.callbacks[callbackId];
+ if (callback) {
+ if (isSuccess && status == cordova.callbackStatus.OK) {
+ callback.success && callback.success.apply(null, args);
+ } else if (!isSuccess) {
+ callback.fail && callback.fail.apply(null, args);
+ }
+ /*
+ else
+ Note, this case is intentionally not caught.
+ this can happen if isSuccess is true, but callbackStatus is NO_RESULT
+ which is used to remove a callback from the list without calling the callbacks
+ typically keepCallback is false in this case
+ */
+ // Clear callback if not expecting any more results
+ if (!keepCallback) {
+ delete cordova.callbacks[callbackId];
+ }
}
}
+ catch (err) {
+ var msg = "Error in " + (isSuccess ? "Success" : "Error") + " callbackId: " + callbackId + " : " + err;
+ console && console.log && console.log(msg);
+ cordova.fireWindowEvent("cordovacallbackerror", { 'message': msg });
+ throw err;
+ }
},
addConstructor: function(func) {
channel.onCordovaReady.subscribe(function() {
@@ -463,9 +472,14 @@ function each(objects, func, context) {
function clobber(obj, key, value) {
exports.replaceHookForTesting(obj, key);
- obj[key] = value;
+ var needsProperty = false;
+ try {
+ obj[key] = value;
+ } catch (e) {
+ needsProperty = true;
+ }
// Getters can only be overridden by getters.
- if (obj[key] !== value) {
+ if (needsProperty || obj[key] !== value) {
utils.defineGetter(obj, key, function() {
return value;
});
@@ -580,7 +594,6 @@ var utils = require('cordova/utils'),
* onDeviceReady* User event fired to indicate that Cordova is ready
* onResume User event fired to indicate a start/resume lifecycle event
* onPause User event fired to indicate a pause lifecycle event
- * onDestroy* Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
*
* The events marked with an * are sticky. Once they have fired, they will stay in the fired state.
* All listeners that subscribe after the event is fired will be executed right away.
@@ -792,9 +805,6 @@ channel.create('onResume');
// Event to indicate a pause lifecycle event
channel.create('onPause');
-// Event to indicate a destroy lifecycle event
-channel.createSticky('onDestroy');
-
// Channels that must fire before "deviceready" is fired.
channel.waitForInitialization('onCordovaReady');
channel.waitForInitialization('onDOMContentLoaded');
@@ -862,14 +872,6 @@ module.exports = {
};
});
-// file: src/firefoxos/firefoxos/commandProxy.js
-define("cordova/firefoxos/commandProxy", function(require, exports, module) {
-
-console.log('WARNING: please require cordova/exec/proxy instead');
-module.exports = require('cordova/exec/proxy');
-
-});
-
// file: src/firefoxos/init.js
define("cordova/init", function(require, exports, module) {
@@ -1003,6 +1005,7 @@ define("cordova/init_b", function(require, exports, module) {
var channel = require('cordova/channel');
var cordova = require('cordova');
var platform = require('cordova/platform');
+var utils = require('cordova/utils');
var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady];
@@ -1038,6 +1041,13 @@ function replaceNavigator(origNavigator) {
if (typeof origNavigator[key] == 'function') {
newNavigator[key] = origNavigator[key].bind(origNavigator);
}
+ else {
+ (function(k) {
+ utils.defineGetterSetter(newNavigator,key,function() {
+ return origNavigator[k];
+ });
+ })(key);
+ }
}
}
return newNavigator;
@@ -1085,7 +1095,7 @@ platform.bootstrap && platform.bootstrap();
* Create all cordova objects once native side is ready.
*/
channel.join(function() {
-
+
platform.initialize && platform.initialize();
// Fire event to notify that all objects are created
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org