Index: pkg/dev_compiler/lib/js/amd/dart_sdk.js |
diff --git a/pkg/dev_compiler/lib/js/amd/dart_sdk.js b/pkg/dev_compiler/lib/js/amd/dart_sdk.js |
index 6ba576051f6d40b3028063b8cfbe60a9eaf048b2..cf0ffface57b3e22582652b3dda726efff848d03 100644 |
--- a/pkg/dev_compiler/lib/js/amd/dart_sdk.js |
+++ b/pkg/dev_compiler/lib/js/amd/dart_sdk.js |
@@ -1899,14 +1899,12 @@ define([], function() { |
if (!condition) dart.throwAssertionError(); |
}; |
dart.throw = function(obj) { |
- if (obj != null && (typeof obj == 'object' || typeof obj == 'function')) { |
- dart._stack.set(obj, new Error()); |
- } |
+ dart._stack = new Error(); |
throw obj; |
}; |
dart.getError = function(exception) { |
- var stack = dart._stack.get(exception); |
- return stack !== void 0 ? stack : exception; |
+ var stack = dart._stack; |
+ return stack !== null ? stack : exception; |
}; |
dart.stackPrint = function(exception) { |
var error = dart.getError(exception); |
@@ -2664,7 +2662,7 @@ define([], function() { |
return false; |
}); |
})(); |
- dart._stack = new WeakMap(); |
+ dart._stack = null; |
dart._value = Symbol("_value"); |
dart.constants = new Map(); |
dart.constantLists = new Map(); |