| Index: runtime/bin/common.dart
|
| diff --git a/runtime/bin/common.dart b/runtime/bin/common.dart
|
| index fafd02ac7176a737be8968235e65c15a770bbc8b..614171c440ca40d1d0f69543879b6ba15b57ef28 100644
|
| --- a/runtime/bin/common.dart
|
| +++ b/runtime/bin/common.dart
|
| @@ -7,13 +7,10 @@
|
| * operating system.
|
| */
|
| class OSError {
|
| - /** Constant used to indicate that no OS error code is available. */
|
| static const int noErrorCode = -1;
|
|
|
| - /** Creates an OSError object from a message and an errorCode. */
|
| const OSError([String this.message = "", int this.errorCode = noErrorCode]);
|
|
|
| - /** Converts an OSError object to a string representation. */
|
| String toString() {
|
| StringBuffer sb = new StringBuffer();
|
| sb.add("OS Error");
|
| @@ -43,40 +40,3 @@ class OSError {
|
| */
|
| final int errorCode;
|
| }
|
| -
|
| -
|
| -// Check if a List is a builtin VM List type. Returns true
|
| -// if the List is a builtin VM List type and false if it is
|
| -// a user defined List type.
|
| -//
|
| -// TODO(5474): At this point it actually return false for
|
| -// _GrowableObjectArrays because of serialization issues.
|
| -bool _isBuiltinList(List buffer) native "Common_IsBuiltinList";
|
| -
|
| -
|
| -// Ensure that the input List can be serialized through a native port.
|
| -// Only builtin Lists can be serialized through. If user-defined Lists
|
| -// get here, the contents is copied to a Uint8List. This has the added
|
| -// benefit that it is faster to access from the C code as well.
|
| -List _ensureFastAndSerializableBuffer(
|
| - List buffer, int offset, int bytes) {
|
| - List outBuffer;
|
| - int outOffset = offset;
|
| - if (buffer is Uint8List || _isBuiltinList(buffer)) {
|
| - outBuffer = buffer;
|
| - } else {
|
| - outBuffer = new Uint8List(bytes);
|
| - outOffset = 0;
|
| - int j = offset;
|
| - for (int i = 0; i < bytes; i++) {
|
| - int value = buffer[j];
|
| - if (value is! int) {
|
| - throw new FileIOException(
|
| - "List element is not an integer at index $j");
|
| - }
|
| - outBuffer[i] = value;
|
| - j++;
|
| - }
|
| - }
|
| - return [outBuffer, outOffset];
|
| -}
|
|
|