| Index: lib/compiler/implementation/lib/native_helper.dart
|
| diff --git a/lib/compiler/implementation/lib/native_helper.dart b/lib/compiler/implementation/lib/native_helper.dart
|
| index 2b361b8349feeae8a49a01e948dbddd84356d95b..1d786cefdfc9abcc62b259eec7353bf1d00c52dd 100644
|
| --- a/lib/compiler/implementation/lib/native_helper.dart
|
| +++ b/lib/compiler/implementation/lib/native_helper.dart
|
| @@ -9,6 +9,12 @@ String typeNameInChrome(obj) {
|
| return name;
|
| }
|
|
|
| +String typeNameInOpera(obj) {
|
| + String name = constructorNameFallback(obj);
|
| + if (name == 'Window') return 'DOMWindow';
|
| + return name;
|
| +}
|
| +
|
| String typeNameInFirefox(obj) {
|
| String name = constructorNameFallback(obj);
|
| if (name == 'Window') return 'DOMWindow';
|
| @@ -49,7 +55,8 @@ String constructorNameFallback(obj) {
|
| // below in that case.
|
| if (JS('String', "typeof(#)", name) === 'string'
|
| && !name.isEmpty()
|
| - && name !== 'Object') {
|
| + && name !== 'Object'
|
| + && name !== 'Function.prototype') { // Can happen in Opera.
|
| return name;
|
| }
|
| }
|
| @@ -72,6 +79,8 @@ Function getFunctionForTypeNameOf() {
|
| return typeNameInFirefox;
|
| } else if (userAgent.contains('MSIE')) {
|
| return typeNameInIE;
|
| + } else if (userAgent.contains('Opera')) {
|
| + return typeNameInOpera;
|
| } else {
|
| return constructorNameFallback;
|
| }
|
|
|