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

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
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | tests/html/audiocontext_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 387b7342767efaa66ede3877fb27bd9e3b949900..dc278a8f98823ab6ee3ed216d914ef31fd0b79a8 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())));
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())));
return reinterpret_cast<void*>(raw_ptr()->data_ + byte_offset);
}
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | tests/html/audiocontext_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698