Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1920)

Unified Diff: lib/runtime/dart/_js_helper.js

Issue 1207313002: initial sync*, part of #221 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/runtime/dart/_js_helper.js
diff --git a/lib/runtime/dart/_js_helper.js b/lib/runtime/dart/_js_helper.js
index 8d21b5f9358b62b28d28f91cafcda3775c3a123a..00fbe7e61e6da0ed88802565efaf34656f0e082e 100644
--- a/lib/runtime/dart/_js_helper.js
+++ b/lib/runtime/dart/_js_helper.js
@@ -117,14 +117,14 @@ dart_library.library('dart/_js_helper', null, /* Imports */[
let m = dart.notNull(multiLine) ? 'm' : '';
let i = dart.notNull(caseSensitive) ? '' : 'i';
let g = dart.notNull(global) ? 'g' : '';
- let regexp = function() {
+ let regexp = (function() {
try {
return new RegExp(source, m + i + g);
} catch (e) {
return e;
}
- }();
+ })();
if (regexp instanceof RegExp)
return regexp;
let errorMessage = String(regexp);

Powered by Google App Engine
This is Rietveld 408576698