Skip to content

Commit c047b76

Browse files
fishythefishCommit Queue
authored and
Commit Queue
committed
[dart2js] Remove IE11 polyfill from StackTrace.current
Change-Id: Id0eb8a75e1d555dcef6c2451b3d363baf141ddd6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326863 Commit-Queue: Mayank Patke <[email protected]> Reviewed-by: Sigmund Cherem <[email protected]>
1 parent 1de2110 commit c047b76

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

sdk/lib/_internal/js_runtime/lib/core_patch.dart

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -828,24 +828,11 @@ class _Uri {
828828
}
829829
}
830830

831-
bool _hasErrorStackProperty = JS('bool', 'new Error().stack != void 0');
832-
833831
@patch
834832
class StackTrace {
835833
@patch
836834
@pragma('dart2js:noInline')
837-
static StackTrace get current {
838-
if (_hasErrorStackProperty) {
839-
return getTraceFromException(JS('', 'new Error()'));
840-
}
841-
// Fallback if new Error().stack does not exist.
842-
// Currently only required for IE 11.
843-
try {
844-
throw '';
845-
} catch (_, stackTrace) {
846-
return stackTrace;
847-
}
848-
}
835+
static StackTrace get current => getTraceFromException(JS('', 'new Error()'));
849836
}
850837

851838
/// Used by Fasta to report a runtime error when a final field with an

0 commit comments

Comments
 (0)