Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: runtime/vm/object.h

Issue 28973003: Test for OscillatorNode.type=. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698