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

Unified Diff: sdk/lib/_internal/js_runtime/lib/async_patch.dart

Issue 1383213002: Make dart2js code retain the original stack trace for uncaught async errors. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add test. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/lib/async/dart2js_uncaught_error_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/js_runtime/lib/async_patch.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/async_patch.dart b/sdk/lib/_internal/js_runtime/lib/async_patch.dart
index c57b3d2be0819541eec1420696df3ba552fed7a8..4d91d7948c31ceb37b515b2a04f3641619b5f5cb 100644
--- a/sdk/lib/_internal/js_runtime/lib/async_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/async_patch.dart
@@ -11,6 +11,7 @@ import 'dart:_js_helper' show
convertDartClosureToJS,
getTraceFromException,
requiresPreamble,
+ wrapException,
unwrapException;
import 'dart:_isolate_helper' show
IsolateNatives,
@@ -518,5 +519,7 @@ class _SyncStarIterable extends IterableBase {
@patch
void _rethrow(Object error, StackTrace stackTrace) {
- throw new AsyncError(error, stackTrace);
+ error = wrapException(error);
+ JS("void", "#.stack = #", error, stackTrace.toString());
+ JS("void", "throw #", error);
}
« no previous file with comments | « no previous file | tests/lib/async/dart2js_uncaught_error_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698