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

Unified Diff: runtime/vm/snapshot.cc

Issue 12937010: Handle TypedDataView objects in Dart_TypedDataAcquireData and (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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/snapshot.cc
===================================================================
--- runtime/vm/snapshot.cc (revision 20344)
+++ runtime/vm/snapshot.cc (working copy)
@@ -54,6 +54,7 @@
static intptr_t ObjectIdFromClassId(intptr_t class_id) {
ASSERT((class_id > kIllegalCid) && (class_id < kNumPredefinedCids));
+ ASSERT(!RawObject::IsTypedDataViewClassId(class_id));
return (class_id + kClassIdsOffset);
}
@@ -925,7 +926,8 @@
RawClass* cls = class_table_->At(raw->GetClassId());
intptr_t class_id = cls->ptr()->id_;
ASSERT(class_id == raw->GetClassId());
- if (class_id >= kNumPredefinedCids) {
+ if (class_id >= kNumPredefinedCids ||
+ RawObject::IsTypedDataViewClassId(class_id)) {
if (Class::IsSignatureClass(cls)) {
// We do not allow closure objects in an isolate message.
set_exception_type(Exceptions::kArgument);
@@ -1197,7 +1199,8 @@
RawClass* cls = class_table_->At(RawObject::ClassIdTag::decode(tags));
intptr_t class_id = cls->ptr()->id_;
- if (class_id >= kNumPredefinedCids) {
+ if (class_id >= kNumPredefinedCids ||
+ RawObject::IsTypedDataViewClassId(class_id)) {
Ivan Posva 2013/03/22 04:50:01 ditto
siva 2013/03/25 17:20:35 Made the same code changes. On 2013/03/22 04:50:0
if (Class::IsSignatureClass(cls)) {
// We do not allow closure objects in an isolate message.
set_exception_type(Exceptions::kArgument);
« runtime/vm/raw_object.cc ('K') | « runtime/vm/raw_object.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698