cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject cordova-windows git commit: CB-9456 Fixed windows app crash on startup
Date Wed, 05 Aug 2015 23:31:48 GMT
Repository: cordova-windows
Updated Branches:
  refs/heads/master cc3cec5da -> 01af8be34


CB-9456 Fixed windows app crash on startup


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

Branch: refs/heads/master
Commit: 01af8be342f15b44b5364769369531b7e0e14fd9
Parents: cc3cec5
Author: alsorokin <alexander.sorokin@akvelon.com>
Authored: Wed Aug 5 16:06:45 2015 +0300
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Wed Aug 5 16:31:22 2015 -0700

----------------------------------------------------------------------
 cordova-js-src/platform.js |  1 +
 template/www/cordova.js    | 62 +++++++++++++++++++++++------------------
 2 files changed, 36 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/01af8be3/cordova-js-src/platform.js
----------------------------------------------------------------------
diff --git a/cordova-js-src/platform.js b/cordova-js-src/platform.js
index 488443b..216b14b 100644
--- a/cordova-js-src/platform.js
+++ b/cordova-js-src/platform.js
@@ -27,6 +27,7 @@ module.exports = {
         var cordova = require('cordova'),
             exec = require('cordova/exec'),
             channel = cordova.require('cordova/channel'),
+            platform = require('cordova/platform'),
             modulemapper = require('cordova/modulemapper');
 
         modulemapper.clobbers('cordova/exec/proxy', 'cordova.commandProxy');

http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/01af8be3/template/www/cordova.js
----------------------------------------------------------------------
diff --git a/template/www/cordova.js b/template/www/cordova.js
index c9279d8..9809a48 100644
--- a/template/www/cordova.js
+++ b/template/www/cordova.js
@@ -1,5 +1,5 @@
 // Platform: windows
-// 796a18d425a03101a1a931c54cd8ea002230067c
+// 2c29e187e4206a6a77fba940ef6f77aef5c7eb8c
 /*
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
@@ -331,7 +331,6 @@ module.exports = cordova;
 // file: src/common/argscheck.js
 define("cordova/argscheck", function(require, exports, module) {
 
-var exec = require('cordova/exec');
 var utils = require('cordova/utils');
 
 var moduleExports = module.exports;
@@ -1013,6 +1012,7 @@ if (!window.console.warn) {
 // Register pause, resume and deviceready channels as events on document.
 channel.onPause = cordova.addDocumentEventHandler('pause');
 channel.onResume = cordova.addDocumentEventHandler('resume');
+channel.onActivated = cordova.addDocumentEventHandler('activated');
 channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
 
 // Listen for DOMContentLoaded and notify our channel subscribers.
@@ -1295,10 +1295,16 @@ module.exports = {
         var cordova = require('cordova'),
             exec = require('cordova/exec'),
             channel = cordova.require('cordova/channel'),
+            platform = require('cordova/platform'),
             modulemapper = require('cordova/modulemapper');
 
         modulemapper.clobbers('cordova/exec/proxy', 'cordova.commandProxy');
 
+        // we will make sure we get this channel
+        // TODO: remove this once other platforms catch up.
+        if(!channel.onActivated) {
+            channel.onActivated = cordova.addDocumentEventHandler('activated');
+        }
         channel.onNativeReady.fire();
 
         var onWinJSReady = function () {
@@ -1357,6 +1363,10 @@ module.exports = {
 // file: src/common/pluginloader.js
 define("cordova/pluginloader", function(require, exports, module) {
 
+/*
+    NOTE: this file is NOT used when we use the browserify workflow
+*/
+
 var modulemapper = require('cordova/modulemapper');
 var urlutil = require('cordova/urlutil');
 
@@ -1545,15 +1555,14 @@ utils.typeName = function(val) {
 /**
  * Returns an indication of whether the argument is an array or not
  */
-utils.isArray = function(a) {
-    return utils.typeName(a) == 'Array';
-};
+utils.isArray = Array.isArray ||
+                function(a) {return utils.typeName(a) == 'Array';};
 
 /**
  * Returns an indication of whether the argument is a Date or not
  */
 utils.isDate = function(d) {
-    return utils.typeName(d) == 'Date';
+    return (d instanceof Date);
 };
 
 /**
@@ -1587,17 +1596,25 @@ utils.clone = function(obj) {
  * Returns a wrapped version of the function
  */
 utils.close = function(context, func, params) {
-    if (typeof params == 'undefined') {
-        return function() {
-            return func.apply(context, arguments);
-        };
-    } else {
-        return function() {
-            return func.apply(context, params);
-        };
-    }
+    return function() {
+        var args = params || arguments;
+        return func.apply(context, args);
+    };
 };
 
+//------------------------------------------------------------------------------
+function UUIDcreatePart(length) {
+    var uuidpart = "";
+    for (var i=0; i<length; i++) {
+        var uuidchar = parseInt((Math.random() * 256), 10).toString(16);
+        if (uuidchar.length == 1) {
+            uuidchar = "0" + uuidchar;
+        }
+        uuidpart += uuidchar;
+    }
+    return uuidpart;
+}
+
 /**
  * Create a UUID
  */
@@ -1609,6 +1626,7 @@ utils.createUUID = function() {
         UUIDcreatePart(6);
 };
 
+
 /**
  * Extends a child object from a parent object using classical inheritance
  * pattern.
@@ -1618,6 +1636,7 @@ utils.extend = (function() {
     var F = function() {};
     // extend Child from Parent
     return function(Child, Parent) {
+
         F.prototype = Parent.prototype;
         Child.prototype = new F();
         Child.__super__ = Parent.prototype;
@@ -1637,18 +1656,7 @@ utils.alert = function(msg) {
 };
 
 
-//------------------------------------------------------------------------------
-function UUIDcreatePart(length) {
-    var uuidpart = "";
-    for (var i=0; i<length; i++) {
-        var uuidchar = parseInt((Math.random() * 256), 10).toString(16);
-        if (uuidchar.length == 1) {
-            uuidchar = "0" + uuidchar;
-        }
-        uuidpart += uuidchar;
-    }
-    return uuidpart;
-}
+
 
 
 });


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


Mime
View raw message