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

Unified Diff: pkg/stack_trace/lib/src/trace.dart

Issue 14071002: Added new version of reduce. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed more uses of max, and a few bugs. Created 7 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:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/lib/array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/stack_trace/lib/src/trace.dart
diff --git a/pkg/stack_trace/lib/src/trace.dart b/pkg/stack_trace/lib/src/trace.dart
index 43a598c872857060bc82e7f6c713c58e8abd212c..bed1d5d89c799419d156dabe75835ffc34572a9a 100644
--- a/pkg/stack_trace/lib/src/trace.dart
+++ b/pkg/stack_trace/lib/src/trace.dart
@@ -5,6 +5,7 @@
library trace;
import 'dart:uri';
+import 'dart:math';
nweiz 2013/04/12 19:47:33 Please import dart:math with a prefix. It has a lo
floitsch 2013/04/13 13:15:51 done in https://codereview.chromium.org/14111004
import 'frame.dart';
@@ -116,7 +117,7 @@ class Trace implements StackTrace {
if (frames.length == '') return '';
// Figure out the longest path so we know how much to pad.
- var longest = frames.map((frame) => frame.location.length).max();
+ var longest = frames.map((frame) => frame.location.length).reduce(max);
// Print out the stack trace nicely formatted.
return frames.map((frame) {
« no previous file with comments | « no previous file | runtime/lib/array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698