| Index: sdk/lib/_internal/compiler/js_lib/native_helper.dart
|
| diff --git a/sdk/lib/_internal/compiler/js_lib/native_helper.dart b/sdk/lib/_internal/compiler/js_lib/native_helper.dart
|
| index 7de3c6fb634a4f0fa29faa7f89138f08ca17cbb9..42c5a95c6520d1d3a513b2851286d033854a4193 100644
|
| --- a/sdk/lib/_internal/compiler/js_lib/native_helper.dart
|
| +++ b/sdk/lib/_internal/compiler/js_lib/native_helper.dart
|
| @@ -443,8 +443,11 @@ applyHooksTransformer(transformer, hooks) {
|
| const _baseHooks = const JS_CONST(r'''
|
| function() {
|
| function typeNameInChrome(o) {
|
| - var name = o.constructor.name;
|
| - if (name) return name;
|
| + var constructor = o.constructor;
|
| + if (constructor) {
|
| + var name = constructor.name;
|
| + if (name) return name;
|
| + }
|
| var s = Object.prototype.toString.call(o);
|
| return s.substring(8, s.length - 1);
|
| }
|
|
|