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

Side by Side Diff: sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart

Issue 48483002: Remove deprecated parts of dart:async. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 7 years, 1 month 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
OLDNEW
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 library pub.load_transformers; 5 library pub.load_transformers;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 10
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 /// [error] should be the result of [CrossIsolateException.serialize]. 372 /// [error] should be the result of [CrossIsolateException.serialize].
373 CrossIsolateException.deserialize(Map error) 373 CrossIsolateException.deserialize(Map error)
374 : type = error['type'], 374 : type = error['type'],
375 message = error['message'], 375 message = error['message'],
376 stackTrace = error['stack'] == null ? null : 376 stackTrace = error['stack'] == null ? null :
377 new Trace.parse(error['stack']); 377 new Trace.parse(error['stack']);
378 378
379 /// Serializes [error] to a map that can safely be passed across isolate 379 /// Serializes [error] to a map that can safely be passed across isolate
380 /// boundaries. 380 /// boundaries.
381 static Map serialize(error, [StackTrace stack]) { 381 static Map serialize(error, [StackTrace stack]) {
382 if (stack == null) stack = getAttachedStackTrace(error); 382 if (stack == null && error is Error) stack = error.stackTrace;
383 return { 383 return {
384 'type': error.runtimeType.toString(), 384 'type': error.runtimeType.toString(),
385 'message': getErrorMessage(error), 385 'message': getErrorMessage(error),
386 'stack': stack == null ? null : stack.toString() 386 'stack': stack == null ? null : stack.toString()
387 }; 387 };
388 } 388 }
389 389
390 String toString() => "\$message\\n\$stackTrace"; 390 String toString() => "\$message\\n\$stackTrace";
391 } 391 }
392 392
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 'replyTo': receivePort.sendPort 701 'replyTo': receivePort.sendPort
702 }); 702 });
703 703
704 return receivePort.first.then((response) { 704 return receivePort.first.then((response) {
705 if (response['type'] == 'success') return response['value']; 705 if (response['type'] == 'success') return response['value'];
706 assert(response['type'] == 'error'); 706 assert(response['type'] == 'error');
707 return new Future.error( 707 return new Future.error(
708 new dart.CrossIsolateException.deserialize(response['error'])); 708 new dart.CrossIsolateException.deserialize(response['error']));
709 }); 709 });
710 } 710 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/dartdoc/bin/dartdoc.dart ('k') | sdk/lib/_internal/pub/lib/src/barback/server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698