We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1de2110 commit c047b76Copy full SHA for c047b76
sdk/lib/_internal/js_runtime/lib/core_patch.dart
@@ -828,24 +828,11 @@ class _Uri {
828
}
829
830
831
-bool _hasErrorStackProperty = JS('bool', 'new Error().stack != void 0');
832
-
833
@patch
834
class StackTrace {
835
836
@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
+ static StackTrace get current => getTraceFromException(JS('', 'new Error()'));
849
850
851
/// Used by Fasta to report a runtime error when a final field with an
0 commit comments