| Index: packages/stack_trace/lib/src/utils.dart
|
| diff --git a/packages/stack_trace/lib/src/utils.dart b/packages/stack_trace/lib/src/utils.dart
|
| index 1d09443c1cfb62dfb7249158d56f32424ccd2542..838a093b5cbf2f37a17991a92d5a142ae81af2a9 100644
|
| --- a/packages/stack_trace/lib/src/utils.dart
|
| +++ b/packages/stack_trace/lib/src/utils.dart
|
| @@ -2,39 +2,14 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -library stack_trace.src.utils;
|
| -
|
| /// The line used in the string representation of stack chains to represent
|
| /// the gap between traces.
|
| const chainGap = '===== asynchronous gap ===========================\n';
|
|
|
| -/// Returns [string] with enough spaces added to the end to make it [length]
|
| -/// characters long.
|
| -String padRight(String string, int length) {
|
| - if (string.length >= length) return string;
|
| -
|
| - var result = new StringBuffer();
|
| - result.write(string);
|
| - for (var i = 0; i < length - string.length; i++) {
|
| - result.write(' ');
|
| - }
|
| -
|
| - return result.toString();
|
| -}
|
| +/// The line used in the string representation of VM stack chains to represent
|
| +/// the gap between traces.
|
| +const vmChainGap = '<asynchronous suspension>\n';
|
|
|
| -/// Flattens nested lists inside an iterable into a single list containing only
|
| -/// non-list elements.
|
| -List flatten(Iterable nested) {
|
| - var result = [];
|
| - helper(list) {
|
| - for (var element in list) {
|
| - if (element is List) {
|
| - helper(element);
|
| - } else {
|
| - result.add(element);
|
| - }
|
| - }
|
| - }
|
| - helper(nested);
|
| - return result;
|
| -}
|
| +// TODO(nweiz): When cross-platform imports work, use them to set this.
|
| +/// Whether we're running in a JS context.
|
| +final bool inJS = 0.0 is int;
|
|
|