Index: sdk/lib/html/dart2js/html_dart2js.dart |
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart |
index bd1ddf9327f140c1adfbaa9f4078e755312f44a3..463d057eec53c9913a20d169578fbafa43d379d3 100644 |
--- a/sdk/lib/html/dart2js/html_dart2js.dart |
+++ b/sdk/lib/html/dart2js/html_dart2js.dart |
@@ -32365,8 +32365,10 @@ _convertNativeToDart_XHR_Response(o) { |
// BSD-style license that can be found in the LICENSE file. |
-_callConstructor(constructor) { |
+_callConstructor(constructor, interceptor) { |
return (receiver) { |
+ setNativeSubclassDispatchRecord(receiver, interceptor); |
+ |
return JS('', '#(#)', constructor, receiver); |
}; |
} |
@@ -32423,6 +32425,8 @@ void _registerCustomElement(context, document, String tag, Type type, |
throw new ArgumentError(type); |
} |
+ var interceptor = JS('=Object', '#.prototype', interceptorClass); |
+ |
var constructor = findConstructorForNativeSubclassType(type, 'created'); |
if (constructor == null) { |
throw new ArgumentError("$type has no constructor called 'created'"); |
@@ -32455,7 +32459,7 @@ void _registerCustomElement(context, document, String tag, Type type, |
JS('void', '#.createdCallback = #', properties, |
JS('=Object', '{value: #}', |
- _makeCallbackMethod(_callConstructor(constructor)))); |
+ _makeCallbackMethod(_callConstructor(constructor, interceptor)))); |
JS('void', '#.enteredViewCallback = #', properties, |
JS('=Object', '{value: #}', _makeCallbackMethod(_callEnteredView))); |
JS('void', '#.leftViewCallback = #', properties, |
@@ -32472,8 +32476,6 @@ void _registerCustomElement(context, document, String tag, Type type, |
var baseProto = JS('=Object', '#.prototype', baseConstructor); |
var proto = JS('=Object', 'Object.create(#, #)', baseProto, properties); |
- var interceptor = JS('=Object', '#.prototype', interceptorClass); |
- |
setNativeSubclassDispatchRecord(proto, interceptor); |
var options = JS('=Object', '{prototype: #}', proto); |