 Chromium Code Reviews
 Chromium Code Reviews Issue 79243002:
  Implement scheduleImmediate for the VM.  (Closed) 
  Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
    
  
    Issue 79243002:
  Implement scheduleImmediate for the VM.  (Closed) 
  Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart| Index: runtime/lib/schedule_immediate_patch.dart | 
| diff --git a/runtime/lib/schedule_immediate_patch.dart b/runtime/lib/schedule_immediate_patch.dart | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..6f05772e50bb93159d5772ad708afa705fe913a3 | 
| --- /dev/null | 
| +++ b/runtime/lib/schedule_immediate_patch.dart | 
| @@ -0,0 +1,18 @@ | 
| +// 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 void scheduleImmediate(void callback()) { | 
| + if (scheduleImmediateClosure == null) { | 
| + throw new UnsupportedError("microtasks are not supported"); | 
| + } | 
| + scheduleImmediateClosure(callback); | 
| +} | 
| + | 
| +typedef void ScheduleImmediateClosure(void callback()); | 
| + | 
| +ScheduleImmediateClosure scheduleImmediateClosure; | 
| 
Ivan Posva
2013/11/27 22:08:32
Why is this public?
 
floitsch
2013/11/28 19:05:54
It is inside the collection-dev library (thus not
 | 
| + | 
| +void setScheduleImmediateClosure(ScheduleImmediateClosure closure) { | 
| + scheduleImmediateClosure = closure; | 
| +} |