Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/code_buffer.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/code_buffer.dart b/sdk/lib/_internal/compiler/implementation/code_buffer.dart |
| index 023db92c05c52105ab3e3b35a6fd52d4cdc487c5..b3b48525677f24c10eabbeb353f3d15ce944678d 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/code_buffer.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/code_buffer.dart |
| @@ -45,7 +45,7 @@ class CodeBuffer implements StringBuffer { |
| } |
| lastBufferOffset = buffer.length + other.lastBufferOffset; |
| } |
| - buffer.add(other.toString()); |
| + buffer.add(other.getText()); |
| } |
| CodeBuffer addAll(Collection<Object> objects) { |
| @@ -67,6 +67,10 @@ class CodeBuffer implements StringBuffer { |
| } |
| String toString() { |
| + throw "Don't use CodeBuffer.toString() since it drops sourcemap data."; |
|
floitsch
2013/01/04 10:31:03
make this an internal error.
sra1
2013/01/04 23:47:52
I will tackle this in a separate CL.
|
| + } |
| + |
| + String getText() { |
| return buffer.toString(); |
| } |