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 fa0c313c662d03e8063a852e028956b8d5c9a7e8..19d9eb33300c07ad9638e13e7f6fdc64a649e4db 100644 |
--- a/pkg/stack_trace/lib/src/trace.dart |
+++ b/pkg/stack_trace/lib/src/trace.dart |
@@ -4,6 +4,7 @@ |
library trace; |
+import 'dart:collection'; |
import 'dart:uri'; |
import 'dart:math' as math; |
@@ -13,7 +14,6 @@ final _patchRegExp = new RegExp(r"-patch$"); |
/// A stack trace, comprised of a list of stack frames. |
class Trace implements StackTrace { |
- // TODO(nweiz): make this read-only once issue 8321 is fixed. |
/// The stack frames that comprise this stack trace. |
final List<Frame> frames; |
@@ -63,7 +63,7 @@ class Trace implements StackTrace { |
/// Returns a new [Trace] comprised of [frames]. |
Trace(Iterable<Frame> frames) |
- : frames = frames.toList(); |
+ : frames = new UnmodifiableListView<Frame>(frames); |
Bob Nystrom
2013/04/22 22:11:40
If the original parameter list is modified, do we
nweiz
2013/04/22 22:46:40
Done.
|
// TODO(nweiz): Keep track of which [Frame]s are part of the partial stack |
// trace and only print them. |