cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Grieve (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-7868) Cordova Android@3.6.4 is broken for some Android versions (Javascript)
Date Tue, 04 Nov 2014 19:22:34 GMT

    [ https://issues.apache.org/jira/browse/CB-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14196639#comment-14196639
] 

Andrew Grieve commented on CB-7868:
-----------------------------------

Okay - based on guesses as to what the issue is, I've committed a fix. Again though - I've
not been able to reproduce the problem, so Boris - if you could verify if the fix works that
would be awesome! Probably easiest way is to apply the patch manually to your version of cordova.js:

{code}
diff --git a/src/common/builder.js b/src/common/builder.js
index 826820d..75d3ea7 100644
--- a/src/common/builder.js
+++ b/src/common/builder.js
@@ -31,9 +31,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;
         });
{code}

> Cordova Android@3.6.4 is broken for some Android versions (Javascript)
> ----------------------------------------------------------------------
>
>                 Key: CB-7868
>                 URL: https://issues.apache.org/jira/browse/CB-7868
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, CordovaJS
>    Affects Versions: 4.0.0
>         Environment: Android >= 2.3.6 && <= 4.0.3 
>            Reporter: Boris Fersing
>
> Cordova 3.6.4 breaks the compatibility with some versions of Android. The app won't load
> I've been able to reproduce the bug on my 2.3.6 and 2.3.7 devices, and according to some
bug reports I found, this might also affect other Android versions <= 4.0.3 but I did not
have the opportunity to test those platforms.
> The bug has been introduced in this commit:  https://github.com/apache/cordova-android/commit/025ca36d3ad0e2acb5c496442a661e3759b30af3
> And the culprit is the Object.defineProperty method that is broken on the platforms I
mentioned above. (see  https://github.com/cujojs/poly/issues/29 )



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message