Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/helpers/trace.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/helpers/trace.dart b/sdk/lib/_internal/compiler/implementation/helpers/trace.dart |
| index 8fcb63b247b93a884da0441f90c2c3036fd9f71b..42c122acbec772dccad77b19f59a8f9a505508a0 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/helpers/trace.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/helpers/trace.dart |
| @@ -14,12 +14,12 @@ part of dart2js.helpers; |
| * printed stack traces based on their content. For instance only print stack |
| * traces that contain specific paths. |
| */ |
| -void trace(String message, [bool condition(String stackTrace)]) { |
| +void trace(String message, {bool condition(String stackTrace), int limit}) { |
|
karlklose
2014/05/07 12:46:37
Should this change be in this CL?
Johnni Winther
2014/05/08 07:03:59
Yes and no. It's not needed but its need showed up
|
| try { |
| throw ''; |
| } catch (e, s) { |
| String stackTrace = prettifyStackTrace( |
| - s, rangeStart: 1, filePrefix: stackTraceFilePrefix); |
| + s, rangeStart: 1, rangeEnd: limit, filePrefix: stackTraceFilePrefix); |
| if (condition != null) { |
| if (!condition(stackTrace)) return; |
| } |
| @@ -27,10 +27,10 @@ void trace(String message, [bool condition(String stackTrace)]) { |
| } |
| } |
| -void traceAndReport(Compiler compiler, Spannable node, |
| - String message, [bool condition(String stackTrace)]) { |
| +void traceAndReport(Compiler compiler, Spannable node, String message, |
| + {bool condition(String stackTrace), int limit}) { |
| - trace(message, (String stackTrace) { |
| + trace(message, condition: (String stackTrace) { |
| bool result = condition != null ? condition(stackTrace) : true; |
| if (result) { |
| reportHere(compiler, node, message); |