| Index: frog/corejs.dart
|
| diff --git a/frog/corejs.dart b/frog/corejs.dart
|
| index 5747a21876a45cecf8721276e4cdfb7662bb021c..92652dd3ca1b05768805c4094e21e3a5fd964fb4 100644
|
| --- a/frog/corejs.dart
|
| +++ b/frog/corejs.dart
|
| @@ -19,6 +19,7 @@ class CoreJs {
|
|
|
| bool useWrap0 = false;
|
| bool useWrap1 = false;
|
| + bool useWrap2 = false;
|
| bool useIsolates = false;
|
|
|
| // These helpers had to switch to a new pattern, because they can be generated
|
| @@ -180,12 +181,9 @@ class CoreJs {
|
| }
|
|
|
| if (!useIsolates) {
|
| - if (useWrap0) {
|
| - _emit(_EMPTY_WRAP_CALL0_FUNCTION);
|
| - }
|
| - if (useWrap1) {
|
| - _emit(_EMPTY_WRAP_CALL1_FUNCTION);
|
| - }
|
| + if (useWrap0) _emit(_EMPTY_WRAP_CALL0_FUNCTION);
|
| + if (useWrap1) _emit(_EMPTY_WRAP_CALL1_FUNCTION);
|
| + if (useWrap2) _emit(_EMPTY_WRAP_CALL2_FUNCTION);
|
| }
|
|
|
| // Write operator helpers
|
| @@ -193,7 +191,7 @@ class CoreJs {
|
| _emit(opImpl);
|
| }
|
|
|
| - if (world.dom != null) {
|
| + if (world.dom != null || world.html != null) {
|
| ensureTypeNameOf();
|
| ensureDefProp();
|
| // TODO(jmesserly): we need to find a way to avoid conflicts with other
|
| @@ -608,6 +606,11 @@ final String _EMPTY_WRAP_CALL1_FUNCTION = @"""
|
| function $wrap_call$1(fn) { return fn; };
|
| """;
|
|
|
| +/** Snippet for `$wrap_call$2`, in case it was not necessary. */
|
| +final String _EMPTY_WRAP_CALL2_FUNCTION = @"""
|
| +function $wrap_call$2(fn) { return fn; };
|
| +""";
|
| +
|
| /** Snippet that initializes Function.prototype.bind. */
|
| final String _BIND_CODE = @"""
|
| Function.prototype.bind = Function.prototype.bind ||
|
|
|