| Index: sdk/lib/async/async_error.dart
|
| diff --git a/sdk/lib/async/async_error.dart b/sdk/lib/async/async_error.dart
|
| index 0990d4da4797887db298475da26e4757d4e083ae..cac1e4ddcf64878b830f985f3c80634f1fd0cb0d 100644
|
| --- a/sdk/lib/async/async_error.dart
|
| +++ b/sdk/lib/async/async_error.dart
|
| @@ -4,13 +4,6 @@
|
|
|
| part of dart.async;
|
|
|
| -final Expando _stackTraceExpando = new Expando("asynchronous error");
|
| -
|
| -void _attachStackTrace(o, StackTrace st) {
|
| - if (o == null || o is bool || o is num || o is String) return;
|
| - _stackTraceExpando[o] = st;
|
| -}
|
| -
|
| _invokeErrorHandler(Function errorHandler,
|
| Object error, StackTrace stackTrace) {
|
| if (errorHandler is ZoneBinaryCallback) {
|
| @@ -28,22 +21,6 @@ Function _registerErrorHandler(Function errorHandler, Zone zone) {
|
| }
|
| }
|
|
|
| -/**
|
| - * *DEPRECATED*. Use explicit stack trace arguments instead.
|
| - *
|
| - * Get the [StackTrace] attached to [o].
|
| - *
|
| - * If object [o] was thrown and caught in a dart:async method, a [StackTrace]
|
| - * object was attached to it. Use [getAttachedStackTrace] to get that object.
|
| - *
|
| - * Returns [null] if no [StackTrace] was attached.
|
| - */
|
| -@deprecated
|
| -getAttachedStackTrace(o) {
|
| - if (o == null || o is bool || o is num || o is String) return null;
|
| - return _stackTraceExpando[o];
|
| -}
|
| -
|
| class _AsyncError implements Error {
|
| final error;
|
| final StackTrace stackTrace;
|
| @@ -53,18 +30,12 @@ class _AsyncError implements Error {
|
|
|
| class _UncaughtAsyncError extends _AsyncError {
|
| _UncaughtAsyncError(error, StackTrace stackTrace)
|
| - : super(error, _getBestStackTrace(error, stackTrace)) {
|
| - // Clear the attached stack trace.
|
| - _attachStackTrace(error, null);
|
| - }
|
| + : super(error, _getBestStackTrace(error, stackTrace));
|
|
|
| static StackTrace _getBestStackTrace(error, StackTrace stackTrace) {
|
| if (stackTrace != null) return stackTrace;
|
| - var trace = getAttachedStackTrace(error);
|
| - if (trace != null) return trace;
|
| if (error is Error) {
|
| - Error e = error;
|
| - return e.stackTrace;
|
| + return error.stackTrace;
|
| }
|
| return null;
|
| }
|
|
|