-
Notifications
You must be signed in to change notification settings - Fork 1.7k
TypeError: 'regExp.get$pattern' is not a function – thrown on Opera, Android browser #3812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Added Area-Dart2JS, Triaged labels. |
This comment was originally written by @bp74 The "Build Bot" of Dart shows everything in green for Opera, but the problem still exists. You can't even start the included sample apps (like Clock) in Opera 12 on the Desktop. I think Opera 12 as a modern browser, which should be able to run JavaScript generated by Dart2Js. Even Opera 12 has no big market share, people ask my why my app is not running in Opera. |
Set owner to @floitschG. |
This comment was originally written by @filiph FYI: the latest Android browser version now runs the script without problems. It seems the issue persists on Opera, though. |
Thanks for the Android update. Wrt Opera: so far I have identified the reasons for the Opera incompatibility. There is a bug in Opera (where it handles modifications to proto the wrong way), and one unspecified behavior where Opera differs from the other browsers. |
CL uploaded: https://chromiumcodereview.appspot.com/10781019/ Note: when patching DOM objects we look at the names of the instances. Unfortunately some browsers differ (for example 'HTMLDocument' vs 'Document', or 'Window' vs 'DOMWindow'). Added Started label. |
Looks like practically any Dart app in Opera is hitting this bug first. Here's the simplest test case I could recreate this with: void checkPattern(r) { void main() { Works in Dartium and Chrome. Throws on Opera. |
Issue #4111 has been merged into this issue. |
This issue was originally filed by @filiph
What steps will reproduce the problem?
What is the expected output? What do you see instead?
In Chrome, Chrome for Android, Safari, Firefox, Firefox for Android – the "web app" initializes and runs without errors.
What version of the product are you using? On what operating system?
Using the latest build on Mac OS X – rev 8973.
Please provide any additional information below.
The generated javascript is here: http://egamebook.com/test/tis_001.html.dart.js. The program uses 2 isolates that communicate with each other. But the problem seems more elementary than that.
Full stack trace (Opera)$.regExpTest(this, $ .checkString($.stringTypeCheck(str)));$.dynamicBind>(obj, name$ , methods, arguments$) in http://egamebook.com/test/tis_001.html.dart.js:$.stringTypeCheck($ .getTypeNameOf(obj));
Error thrown at line 7401, column 2 in <anonymous function: $.regExpMakeNative>(regExp, global) in http://egamebook.com/test/tis_001.html.dart.js:
var pattern = $.stringTypeCheck(regExp.get$pattern());
called from line 8330, column 2 in <anonymous function: $.regExpGetNative>(regExp) in http://egamebook.com/test/tis_001.html.dart.js:
return r === (void 0) ? (regExp._re = $.regExpMakeNative(regExp, false)) : r;
called from line 7205, column 2 in <anonymous function: $.regExpTest>(regExp, str) in http://egamebook.com/test/tis_001.html.dart.js:
return $.regExpGetNative(regExp).test(str);
called from line 902, column 2 in <anonymous function: hasMatch$1>(str) in http://egamebook.com/test/tis_001.html.dart.js:
return
called from line 7332, column 62 in <anonymous function: $.stringContainsUnchecked>(receiver, other, startIndex) in http://egamebook.com/test/tis_001.html.dart.js:
return other.hasMatch$1($.substring$1(receiver, startIndex));
called from line 8520, column 2 in <anonymous function: $.contains$2>(receiver, other, startIndex) in http://egamebook.com/test/tis_001.html.dart.js:
return $.stringContainsUnchecked(receiver, other, startIndex);
called from line 7021, column 2 in <anonymous function: $.contains$1>(receiver, other) in http://egamebook.com/test/tis_001.html.dart.js:
return $.contains$2(receiver, other, 0);
called from line 9062, column 2 in <anonymous function: $.getFunctionForTypeNameOf>() in http://egamebook.com/test/tis_001.html.dart.js:
if ($.contains$1(userAgent, $.CTC15) === true)
called from line 9338, column 37 in <anonymous function: $.getTypeNameOf>(obj) in http://egamebook.com/test/tis_001.html.dart.js:
$._getTypeNameOf = $.getFunctionForTypeNameOf();
called from line 9024, column 2 in <anonymous function:
var tag =
The text was updated successfully, but these errors were encountered: