Updates:
Status: Started
Owner:
a...@google.com
Comment #1 on issue 15171 by
a...@google.com: dart2js errors have stack
Nathan,
Try this patch:
diff --git a/dart/sdk/lib/_internal/lib/js_helper.dart
b/dart/sdk/lib/_internal/lib/js_helper.dart
index 2e350b7..7cba4fd 100644
--- a/dart/sdk/lib/_internal/lib/js_helper.dart
+++ b/dart/sdk/lib/_internal/lib/js_helper.dart
@@ -1419,7 +1419,12 @@ unwrapException(ex) {
* Called by generated code to fetch the stack trace from an
* exception. Should never return null.
*/
-StackTrace getTraceFromException(exception) => new _StackTrace(exception);
+StackTrace getTraceFromException(exception) {
+ _StackTrace trace = JS('_StackTrace|Null', r'#.$cachedTrace', exception);
+ if (trace != null) return trace;
+ trace = new _StackTrace(exception);
+ return JS('_StackTrace', r'#.$cachedTrace = #', exception, trace);
+}
class _StackTrace implements StackTrace {
var _exception;
I'm at home without VPN right now, but I'll try to get this submitted
tomorrow.
Cheers,
Peter