Index: pkg/analyzer/lib/src/summary/api_signature.dart |
diff --git a/pkg/analyzer/lib/src/summary/api_signature.dart b/pkg/analyzer/lib/src/summary/api_signature.dart |
index 230b6d02a1f15f6e50c95b789bd98d759765f160..d8c29c6c4d1adf93bcc4553f627481fa9922e0a9 100644 |
--- a/pkg/analyzer/lib/src/summary/api_signature.dart |
+++ b/pkg/analyzer/lib/src/summary/api_signature.dart |
@@ -72,10 +72,12 @@ class ApiSignature { |
* `addBytes([1]); addBytes([2]);`. |
*/ |
void addBytes(List<int> bytes) { |
- _makeRoom(bytes.length); |
- new Uint8List.view(_data.buffer) |
- .setRange(_offset, _offset + bytes.length, bytes); |
- _offset += bytes.length; |
+ int length = bytes.length; |
+ _makeRoom(length); |
+ for (int i = 0; i < length; i++) { |
+ _data.setUint8(_offset + i, bytes[i]); |
+ } |
+ _offset += length; |
} |
/** |