Index: tool/input_sdk/patch/async_patch.dart |
diff --git a/tool/input_sdk/patch/async_patch.dart b/tool/input_sdk/patch/async_patch.dart |
index eefc637dcc64de2a47110375ef761a2bcd2e7bfd..dfc883a382de4498aad513b79d8869732722b04e 100644 |
--- a/tool/input_sdk/patch/async_patch.dart |
+++ b/tool/input_sdk/patch/async_patch.dart |
@@ -20,14 +20,16 @@ import 'dart:_foreign_helper' show JS; |
class _AsyncRun { |
@patch |
static void _scheduleImmediate(void callback()) { |
- scheduleImmediateClosure(callback); |
+ _scheduleImmediateClosure(callback); |
} |
// Lazily initialized. |
- static final Function scheduleImmediateClosure = |
+ static final Function _scheduleImmediateClosure = |
_initializeScheduleImmediate(); |
static Function _initializeScheduleImmediate() { |
+ // TODO(rnystrom): Not needed by dev_compiler. |
+ // requiresPreamble(); |
if (JS('', 'self.scheduleImmediate') != null) { |
return _scheduleImmediateJsOverride; |
} |
@@ -116,4 +118,10 @@ class Timer { |
} |
} |
-bool get _hasDocument => JS('String', 'typeof document') == 'object'; |
+@patch |
+void _rethrow(Object error, StackTrace stackTrace) { |
+ // TODO(rnystrom): Not needed by dev_compiler. |
+ // error = wrapException(error); |
+ JS("void", "#.stack = #", error, stackTrace.toString()); |
+ JS("void", "throw #", error); |
+} |