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

Unified Diff: packages/stack_trace/lib/src/utils.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 5 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:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packages/stack_trace/lib/src/unparsed_frame.dart ('k') | packages/stack_trace/lib/src/vm_trace.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « packages/stack_trace/lib/src/unparsed_frame.dart ('k') | packages/stack_trace/lib/src/vm_trace.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698