| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart.async; | 5 part of dart.async; |
| 6 | 6 |
| 7 typedef dynamic ZoneCallback(); | 7 typedef dynamic ZoneCallback(); |
| 8 typedef dynamic ZoneUnaryCallback(arg); | 8 typedef dynamic ZoneUnaryCallback(arg); |
| 9 typedef dynamic ZoneBinaryCallback(arg1, arg2); | 9 typedef dynamic ZoneBinaryCallback(arg1, arg2); |
| 10 | 10 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 Timer createTimer(Zone self, ZoneDelegate parent, Zone zone, | 128 Timer createTimer(Zone self, ZoneDelegate parent, Zone zone, |
| 129 Duration duration, void f()): null, | 129 Duration duration, void f()): null, |
| 130 Timer createPeriodicTimer(Zone self, ZoneDelegate parent, Zone zone, | 130 Timer createPeriodicTimer(Zone self, ZoneDelegate parent, Zone zone, |
| 131 Duration period, void f(Timer timer)): null, | 131 Duration period, void f(Timer timer)): null, |
| 132 void print(Zone self, ZoneDelegate parent, Zone zone, String line): null, | 132 void print(Zone self, ZoneDelegate parent, Zone zone, String line): null, |
| 133 Zone fork(Zone self, ZoneDelegate parent, Zone zone, | 133 Zone fork(Zone self, ZoneDelegate parent, Zone zone, |
| 134 ZoneSpecification specification, | 134 ZoneSpecification specification, |
| 135 Map zoneValues): null | 135 Map zoneValues): null |
| 136 }) { | 136 }) { |
| 137 return new ZoneSpecification( | 137 return new ZoneSpecification( |
| 138 handleUncaughtError: handleUncaughtError != null | 138 handleUncaughtError: handleUncaughtError ?? other.handleUncaughtError, |
| 139 ? handleUncaughtError | 139 run: run ?? other.run, |
| 140 : other.handleUncaughtError, | 140 runUnary: runUnary ?? other.runUnary, |
| 141 run: run != null ? run : other.run, | 141 runBinary: runBinary ?? other.runBinary, |
| 142 runUnary: runUnary != null ? runUnary : other.runUnary, | 142 registerCallback: registerCallback ?? other.registerCallback, |
| 143 runBinary: runBinary != null ? runBinary : other.runBinary, | 143 registerUnaryCallback: registerUnaryCallback ?? |
| 144 registerCallback: registerCallback != null | 144 other.registerUnaryCallback, |
| 145 ? registerCallback | 145 registerBinaryCallback: registerBinaryCallback ?? |
| 146 : other.registerCallback, | 146 other.registerBinaryCallback, |
| 147 registerUnaryCallback: registerUnaryCallback != null | 147 errorCallback: errorCallback ?? other.errorCallback, |
| 148 ? registerUnaryCallback | 148 scheduleMicrotask: scheduleMicrotask ?? other.scheduleMicrotask, |
| 149 : other.registerUnaryCallback, | 149 createTimer : createTimer ?? other.createTimer, |
| 150 registerBinaryCallback: registerBinaryCallback != null | 150 createPeriodicTimer: createPeriodicTimer ?? other.createPeriodicTimer, |
| 151 ? registerBinaryCallback | 151 print : print ?? other.print, |
| 152 : other.registerBinaryCallback, | 152 fork: fork ?? other.fork); |
| 153 errorCallback: errorCallback != null | |
| 154 ? errorCallback | |
| 155 : other.errorCallback, | |
| 156 scheduleMicrotask: scheduleMicrotask != null | |
| 157 ? scheduleMicrotask | |
| 158 : other.scheduleMicrotask, | |
| 159 createTimer : createTimer != null ? createTimer : other.createTimer, | |
| 160 createPeriodicTimer: createPeriodicTimer != null | |
| 161 ? createPeriodicTimer | |
| 162 : other.createPeriodicTimer, | |
| 163 print : print != null ? print : other.print, | |
| 164 fork: fork != null ? fork : other.fork); | |
| 165 } | 153 } |
| 166 | 154 |
| 167 HandleUncaughtErrorHandler get handleUncaughtError; | 155 HandleUncaughtErrorHandler get handleUncaughtError; |
| 168 RunHandler get run; | 156 RunHandler get run; |
| 169 RunUnaryHandler get runUnary; | 157 RunUnaryHandler get runUnary; |
| 170 RunBinaryHandler get runBinary; | 158 RunBinaryHandler get runBinary; |
| 171 RegisterCallbackHandler get registerCallback; | 159 RegisterCallbackHandler get registerCallback; |
| 172 RegisterUnaryCallbackHandler get registerUnaryCallback; | 160 RegisterUnaryCallbackHandler get registerUnaryCallback; |
| 173 RegisterBinaryCallbackHandler get registerBinaryCallback; | 161 RegisterBinaryCallbackHandler get registerBinaryCallback; |
| 174 ErrorCallbackHandler get errorCallback; | 162 ErrorCallbackHandler get errorCallback; |
| (...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1238 handleUncaughtError: errorHandler); | 1226 handleUncaughtError: errorHandler); |
| 1239 } | 1227 } |
| 1240 Zone zone = Zone.current.fork(specification: zoneSpecification, | 1228 Zone zone = Zone.current.fork(specification: zoneSpecification, |
| 1241 zoneValues: zoneValues); | 1229 zoneValues: zoneValues); |
| 1242 if (onError != null) { | 1230 if (onError != null) { |
| 1243 return zone.runGuarded(body); | 1231 return zone.runGuarded(body); |
| 1244 } else { | 1232 } else { |
| 1245 return zone.run(body); | 1233 return zone.run(body); |
| 1246 } | 1234 } |
| 1247 } | 1235 } |
| OLD | NEW |