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:38 UTC

[1/2] cordova-wp8 git commit: Update JS snapshot to version 3.8.0 (via coho)

Repository: cordova-wp8
Updated Branches:
  refs/heads/3.8.x [created] 88134079e


Update JS snapshot to version 3.8.0 (via coho)


Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/38f4ed99
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/38f4ed99
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/38f4ed99

Branch: refs/heads/3.8.x
Commit: 38f4ed9993d712cc2d6e4398e97a4c3f74efa181
Parents: 2879a71
Author: Steve Gill <st...@gmail.com>
Authored: Thu Mar 26 14:08:27 2015 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Mar 26 14:08:27 2015 -0700

----------------------------------------------------------------------
 template/www/cordova.js | 41 +++++++++++++++++++++++++----------------
 1 file changed, 25 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/38f4ed99/template/www/cordova.js
----------------------------------------------------------------------
diff --git a/template/www/cordova.js b/template/www/cordova.js
index e92a31b..54032be 100644
--- a/template/www/cordova.js
+++ b/template/www/cordova.js
@@ -1,5 +1,5 @@
-// Platform: windowsphone
-// 91157c2e1bf3eb098c7e2ab31404e895ccb0df2a
+// Platform: wp8
+// 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 PLATFORM_VERSION_BUILD_LABEL = '3.8.0-dev';
+var PLATFORM_VERSION_BUILD_LABEL = '3.8.0';
 // 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');
@@ -284,10 +286,16 @@ var cordova = {
             if (callback) {
                 if (isSuccess && status == cordova.callbackStatus.OK) {
                     callback.success && callback.success.apply(null, args);
-                } else {
+                } 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];
@@ -464,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;
         });
@@ -581,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.
@@ -793,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');
@@ -804,7 +813,7 @@ module.exports = channel;
 
 });
 
-// file: src/windowsphone/exec.js
+// file: src/wp8/exec.js
 define("cordova/exec", function(require, exports, module) {
 
 var cordova = require('cordova'),
@@ -935,7 +944,7 @@ function replaceNavigator(origNavigator) {
         for (var key in origNavigator) {
             if (typeof origNavigator[key] == 'function') {
                 newNavigator[key] = origNavigator[key].bind(origNavigator);
-            } 
+            }
             else {
                 (function(k) {
                     utils.defineGetterSetter(newNavigator,key,function() {
@@ -1063,7 +1072,7 @@ function replaceNavigator(origNavigator) {
         for (var key in origNavigator) {
             if (typeof origNavigator[key] == 'function') {
                 newNavigator[key] = origNavigator[key].bind(origNavigator);
-            } 
+            }
             else {
                 (function(k) {
                     utils.defineGetterSetter(newNavigator,key,function() {
@@ -1118,7 +1127,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
@@ -1236,7 +1245,7 @@ exports.reset();
 
 });
 
-// file: src/windowsphone/platform.js
+// file: src/wp8/platform.js
 define("cordova/platform", function(require, exports, module) {
 
 module.exports = {


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


[2/2] cordova-wp8 git commit: Set VERSION to 3.8.0 (via coho)

Posted by st...@apache.org.
Set VERSION to 3.8.0 (via coho)


Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/88134079
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/88134079
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/88134079

Branch: refs/heads/3.8.x
Commit: 88134079ef5ae90ec91e4410366590d9b31c1eb6
Parents: 38f4ed9
Author: Steve Gill <st...@gmail.com>
Authored: Thu Mar 26 14:08:28 2015 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Mar 26 14:08:28 2015 -0700

----------------------------------------------------------------------
 VERSION      | 2 +-
 package.json | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/88134079/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
index d4da33b..1981190 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.8.0-dev
+3.8.0

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/88134079/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 5d1100f..84e49a8 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
     "name": "cordova-wp8",
-    "version": "3.8.0-dev",
+    "version": "3.8.0",
     "description": "cordova-wp8 release",
     "main": "bin/create",
     "repository": {
@@ -41,4 +41,4 @@
     },
     "author": "Apache Software Foundation",
     "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