| Index: sdk/lib/_internal/pub/lib/src/dart.dart
|
| diff --git a/sdk/lib/_internal/pub/lib/src/dart.dart b/sdk/lib/_internal/pub/lib/src/dart.dart
|
| index 28902cca82f804464f5686b89f72c66855c3e640..7e1fe28b23b20bff770e2a8d7751b6e766294471 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/dart.dart
|
| +++ b/sdk/lib/_internal/pub/lib/src/dart.dart
|
| @@ -172,7 +172,7 @@ class CrossIsolateException implements Exception {
|
| /// Serializes [error] to an object that can safely be passed across isolate
|
| /// boundaries.
|
| static Map serialize(error, [StackTrace stack]) {
|
| - if (stack == null) stack = getAttachedStackTrace(error);
|
| + if (stack == null && error is Error) stack = error.stackTrace;
|
| return {
|
| 'type': error.runtimeType.toString(),
|
| 'message': getErrorMessage(error),
|
|
|