File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
dev/core/super/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -77,23 +77,20 @@ public static native void defineClass(JavaScriptObject typeId,
7777 }
7878 }-*/ ;
7979
80- private static native JavaScriptObject portableObjCreate (JavaScriptObject obj ) /*-{
81- function F() {};
82- F.prototype = obj || {};
83- return new F();
84- }-*/ ;
85-
8680 /**
8781 * Create a subclass prototype.
8882 */
8983 private static native JavaScriptObject createSubclassPrototype (
9084 JavaScriptObject superTypeIdOrPrototype ) /*-{
91- var superPrototype = superTypeIdOrPrototype && superTypeIdOrPrototype.prototype;
92- if (!superPrototype) {
93- // If it is not a prototype, then it should be a type id.
94- superPrototype = @Runtime::prototypesByTypeId[superTypeIdOrPrototype];
85+ var superPrototype = null;
86+ if (superTypeIdOrPrototype != null) {
87+ superPrototype = superTypeIdOrPrototype && superTypeIdOrPrototype.prototype;
88+ if (!superPrototype) {
89+ // If it is not a prototype, then it should be a type id.
90+ superPrototype = @Runtime::prototypesByTypeId[superTypeIdOrPrototype];
91+ }
9592 }
96- return @Runtime::portableObjCreate(*) (superPrototype);
93+ return Object.create (superPrototype);
9794 }-*/ ;
9895
9996 public static native void copyObjectProperties (JavaScriptObject from , JavaScriptObject to ) /*-{
You can’t perform that action at this time.
0 commit comments