Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(726)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart

Issue 12886011: Add unhandledExceptionCallback to streamSpawnFunction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/lib/isolate_patch.dart ('k') | sdk/lib/isolate/base.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Patch file for the dart:isolate library. 5 // Patch file for the dart:isolate library.
6 6
7 import 'dart:_isolate_helper' show IsolateNatives, 7 import 'dart:_isolate_helper' show IsolateNatives,
8 lazyPort, 8 lazyPort,
9 ReceivePortImpl; 9 ReceivePortImpl;
10 10
11 patch class _Isolate { 11 patch class _Isolate {
12 patch static ReceivePort get port { 12 patch static ReceivePort get port {
13 if (lazyPort == null) { 13 if (lazyPort == null) {
14 lazyPort = new ReceivePort(); 14 lazyPort = new ReceivePort();
15 } 15 }
16 return lazyPort; 16 return lazyPort;
17 } 17 }
18 18
19 patch static SendPort spawnFunction(void topLevelFunction(), 19 patch static SendPort spawnFunction(void topLevelFunction(),
20 [bool UnhandledExceptionCallback(IsolateUnhandledException e)]) { 20 [bool unhandledExceptionCallback(IsolateUnhandledException e)]) {
21 // TODO(9012): Don't ignore the UnhandledExceptionCallback. 21 if (unhandledExceptionCallback != null) {
22 // TODO(9012): Implement the UnhandledExceptionCallback.
23 throw new UnimplementedError(
24 "spawnFunction with unhandledExceptionCallback");
25 }
22 return IsolateNatives.spawnFunction(topLevelFunction); 26 return IsolateNatives.spawnFunction(topLevelFunction);
23 } 27 }
24 28
25 patch static SendPort spawnUri(String uri) { 29 patch static SendPort spawnUri(String uri) {
26 return IsolateNatives.spawn(null, uri, false); 30 return IsolateNatives.spawn(null, uri, false);
27 } 31 }
28 } 32 }
29 33
30 /** Default factory for receive ports. */ 34 /** Default factory for receive ports. */
31 patch class ReceivePort { 35 patch class ReceivePort {
32 patch factory ReceivePort() { 36 patch factory ReceivePort() {
33 return new ReceivePortImpl(); 37 return new ReceivePortImpl();
34 } 38 }
35 } 39 }
OLDNEW
« no previous file with comments | « runtime/lib/isolate_patch.dart ('k') | sdk/lib/isolate/base.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698