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

Unified Diff: lib/runtime/dart_sdk.js

Issue 1927813002: Land fix to StackTrace.current performance already landed in dart2js. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « no previous file | tool/input_sdk/patch/core_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart_sdk.js
diff --git a/lib/runtime/dart_sdk.js b/lib/runtime/dart_sdk.js
index 4458ec1367703764d3e3a273abcc1a4c020d260c..1cbda8bd0614d3f46a886f619f5036d6ad1f65a0 100644
--- a/lib/runtime/dart_sdk.js
+++ b/lib/runtime/dart_sdk.js
@@ -27164,16 +27164,13 @@ dart_library.library('dart_sdk', null, /* Imports */[
core.Sink = core.Sink$();
core.StackTrace = class StackTrace extends core.Object {
static get current() {
- let error = new Error();
- let stack = error.stack;
- if (typeof stack == 'string') return new core.StackTrace.fromString(stack);
if (Error.captureStackTrace != null) {
+ let error = new Error();
Error.captureStackTrace(error);
- let stack = error.stack;
- if (typeof stack == 'string') return new core.StackTrace.fromString(stack);
+ return _js_helper.getTraceFromException(error);
}
try {
- dart.throw(0);
+ dart.throw('');
} catch (_) {
let stackTrace = dart.stackTrace(_);
return stackTrace;
« no previous file with comments | « no previous file | tool/input_sdk/patch/core_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698