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

Unified Diff: runtime/vm/raw_object.cc

Issue 8403041: Add missed size check for kTypeArray. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.cc
===================================================================
--- runtime/vm/raw_object.cc (revision 826)
+++ runtime/vm/raw_object.cc (working copy)
@@ -103,6 +103,13 @@
instance_size = Array::InstanceSize(array_length);
break;
}
+ case kTypeArray: {
+ const RawTypeArray* raw_array =
+ reinterpret_cast<const RawTypeArray*>(this);
+ intptr_t array_length = Smi::Value(raw_array->ptr()->length_);
+ instance_size = TypeArray::InstanceSize(array_length);
+ break;
+ }
case kPcDescriptors: {
const RawPcDescriptors* raw_descriptors =
reinterpret_cast<const RawPcDescriptors*>(this);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698