Index: runtime/vm/object.h |
diff --git a/runtime/vm/object.h b/runtime/vm/object.h |
index 387b7342767efaa66ede3877fb27bd9e3b949900..b6c9f3ec7db01add63f5da76d6a27619596b103f 100644 |
--- a/runtime/vm/object.h |
+++ b/runtime/vm/object.h |
@@ -5615,7 +5615,8 @@ class TypedData : public Instance { |
} |
void* DataAddr(intptr_t byte_offset) const { |
- ASSERT((byte_offset >= 0) && (byte_offset < LengthInBytes())); |
+ ASSERT((byte_offset == 0) || |
+ ((byte_offset >= 0) && (byte_offset < LengthInBytes()))); |
siva
2013/10/22 00:08:53
Not sure what the value of byte_offset is in this
rmacnak
2013/10/22 00:28:21
byte_offset == 0 handles the case where the array
siva
2013/10/22 18:26:49
In that case should the assert be changed to
ASSER
|
return reinterpret_cast<void*>(raw_ptr()->data_ + byte_offset); |
} |
@@ -5747,7 +5748,8 @@ class ExternalTypedData : public Instance { |
} |
void* DataAddr(intptr_t byte_offset) const { |
- ASSERT((byte_offset >= 0) && (byte_offset < LengthInBytes())); |
+ ASSERT((byte_offset == 0) || |
+ ((byte_offset >= 0) && (byte_offset < LengthInBytes()))); |
siva
2013/10/22 18:26:49
Ditto.
|
return reinterpret_cast<void*>(raw_ptr()->data_ + byte_offset); |
} |