4360e99d18
This reverts commit b1f7e6d94673b098c93c187fe3efc45c15f27edc. BUG= Committed: https://github.com/dart-lang/sdk/commit/62be0eacfbb36bdc92a05c7c35bb4506621b6a3a Review-Url: https://codereview.chromium.org/2767533002 .
25 lines
719 B
Dart
25 lines
719 B
Dart
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
@patch
|
|
class _AsyncRun {
|
|
@patch
|
|
static void _scheduleImmediate(void callback()) {
|
|
if (_ScheduleImmediate._closure == null) {
|
|
throw new UnsupportedError("Microtasks are not supported");
|
|
}
|
|
_ScheduleImmediate._closure(callback);
|
|
}
|
|
}
|
|
|
|
typedef void _ScheduleImmediateClosure(void callback());
|
|
|
|
class _ScheduleImmediate {
|
|
static _ScheduleImmediateClosure _closure;
|
|
}
|
|
|
|
void _setScheduleImmediateClosure(_ScheduleImmediateClosure closure) {
|
|
_ScheduleImmediate._closure = closure;
|
|
}
|