Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2821] V8 runtime defines Object.prototype.extend which breaks compatibility to qooxdoo javascript framework

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2011-12-19T16:41:50.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, v8
ReporterDietrich Streifert
AssigneeMauro Parra-Miranda
Created2011-12-14T12:33:32.000+0000
Updated2016-03-08T07:47:45.000+0000

Description

We are using the stripped down version of qooxdoo (http://www.qooxdoo.org) called qx-oo ( http://demo.qooxdoo.org/current/framework/qx-oo-noopt.js ). The qooxdoo class definition mechanism looks for the existence of an attribute called "extend" within the class definition arguments which are defined as an object with attributes. qooxdoo decides on the absence or existence of the attribute "extend" if a class has only statics or if the class is used for instantiation. Because of the defined "extend" attribute/function/method in Object.prototype.extend this mechanism breaks. The attempt to remove Object.prototype.extend via delete is ignored. Tests with standalone V8 on centos 6 showed that Object.prototype.extend is not defined there. So it is unique to the titanium android V8 derivate. On iOS qooxdoo is usable without any problems.

Comments

  1. Dietrich Streifert 2011-12-15

    Evaluating the code Object.prototype.extend.toString(); gives the following source code:
          function (other) {
             if (!other) return;
       	
             for (var name in other) {
                if (other.hasOwnProperty(name)) {
                   this[name] = other[name];
                }
             }
       
             return this;
          }
       
    Where does it come from?
  2. Dietrich Streifert 2011-12-15

    Q&A discussion on this topic: [http://developer.appcelerator.com/question/129475/v8-runtime-defines-objectprototypeextend-which-may-break-compatibility-to-javascript-framework]
  3. Mauro Parra-Miranda 2013-11-24

    DUP issue.

JSON Source