Chromium Code Reviews| Index: tools/dom/templates/html/dartium/html_dartium.darttemplate |
| diff --git a/tools/dom/templates/html/dartium/html_dartium.darttemplate b/tools/dom/templates/html/dartium/html_dartium.darttemplate |
| index 66a18e0cf9d62595ba2858b43c6d61f05f0c4c7d..a24533178ac10beffe4bf6d46368c1721fef5593 100644 |
| --- a/tools/dom/templates/html/dartium/html_dartium.darttemplate |
| +++ b/tools/dom/templates/html/dartium/html_dartium.darttemplate |
| @@ -118,7 +118,7 @@ Window get window { |
| } |
| $if DARTIUM |
| $if JSINTEROP |
| - _window = wrap_jso(js.JsNative.getProperty(js.context, 'window')); |
| + _window = js.JsNative.toTypedObject(js.context); |
| $else |
| _window = _Utils.window(); |
| $endif |
| @@ -161,6 +161,11 @@ final htmlBlinkMap = { |
| 'JsObject': () => js.JsObject, |
| 'JsFunction': () => js.JsFunction, |
| 'JsArray': () => js.JsArray, |
| + // We have to call .instanceRuntimeType as these classes have a private |
| + // implementation class defined dynamically at runtime via a patch file. |
| + 'JSObject': () => js.JSObject.instanceRuntimeType, |
| + 'JSFunction': () => js.JSFunction.instanceRuntimeType, |
| + 'JSArray': () => js.JSArray.instanceRuntimeType, |
| $!TYPE_MAP |
| }; |
| @@ -417,7 +422,7 @@ Map<String, dynamic> convertNativeObjectToDartMap(js.JsObject jsObject) { |
| var result = new Map(); |
| var keys = js.JsNative.callMethod(js.JsNative.getProperty(js.context, 'Object'), 'keys', [jsObject]); |
| for (var key in keys) { |
| - result[key] = wrap_jso(js.JsNative.getProperty(jsObject, key)); |
| + result[key] = js.JsNative.getProperty(jsObject, key); |
| } |
| return result; |
| } |
| @@ -427,11 +432,14 @@ Map<String, dynamic> convertNativeObjectToDartMap(js.JsObject jsObject) { |
| */ |
| _createCustomUpgrader(Type customElementClass, $this) { |
| var dartClass; |
| + throw 'TODO(jacobr): implement _createCustomUpgrader'; |
| try { |
| dartClass = _blink.Blink_Utils.constructElement(customElementClass, $this); |
| } catch (e) { |
| // Did the dartClass get allocated but the created failed? Otherwise, other |
| // components inside of this failed somewhere (could be JS custom element). |
| + // TODO(jacobr): clearly this can't happen otherwise an exception wouldn't |
|
Alan Knight
2016/03/25 21:39:09
I think I remember Terry introducing this because
Jacob
2016/03/30 00:19:00
This code path is now obsolete. I've rewritten all
|
| + // have been thrown. This code needs to be carefully reviewed. |
| if (dartClass != null) { |
| // Yes, mark as didn't upgrade. |
| dartClass._badUpgrade(); |
| @@ -441,7 +449,10 @@ _createCustomUpgrader(Type customElementClass, $this) { |
| // Need to remember the Dart class that was created for this custom so |
| // return it and setup the blink_jsObject to the $this that we'll be working |
| // with as we talk to blink. |
| - js.setDartHtmlWrapperFor($this, dartClass); |
| + // XXX terry, what do we need to do for this code? |
| + print("XXX VALIDATE THIS CASE WORKS"); |
| + // XXX THIS IS ALL KINDS OF FOOBAR. |
| + // js.setDartHtmlWrapperFor($this, dartClass); |
| } |
| return dartClass; |