Index: sdk/lib/_internal/lib/interceptors.dart |
diff --git a/sdk/lib/_internal/lib/interceptors.dart b/sdk/lib/_internal/lib/interceptors.dart |
index bfdbb36b16dae106c533f6ead39251fd251642f1..e87ce4fad2b33c5a7b074ba2edba124c2e4874fb 100644 |
--- a/sdk/lib/_internal/lib/interceptors.dart |
+++ b/sdk/lib/_internal/lib/interceptors.dart |
@@ -16,6 +16,8 @@ import 'dart:_js_helper' show allMatchesInStringUnchecked, |
checkString, |
defineProperty, |
getRuntimeType, |
+ initNativeDispatch, |
+ initNativeDispatchFlag, |
regExpGetNative, |
stringContainsUnchecked, |
stringLastIndexOfUnchecked, |
@@ -115,6 +117,13 @@ dispatchRecordIndexability(record) => JS('bool|Null', '#.x', record); |
getNativeInterceptor(object) { |
var record = getDispatchProperty(object); |
+ if (record == null) { |
+ if (initNativeDispatchFlag == null) { |
+ initNativeDispatch(); |
+ record = getDispatchProperty(object); |
+ } |
+ } |
+ |
if (record != null) { |
var proto = dispatchRecordProto(record); |
if (false == proto) return dispatchRecordInterceptor(record); |
@@ -142,7 +151,6 @@ getNativeInterceptor(object) { |
return getNativeInterceptor(object); |
} |
- |
/** |
* If [JSInvocationMirror._invokeOn] is being used, this variable |
* contains a JavaScript array with the names of methods that are |