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

Unified Diff: runtime/vm/object.cc

Issue 9567023: Fix crash in inline cache: forgot to GC properly RawICData. Various cleanups. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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/object.h ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 4802)
+++ runtime/vm/object.cc (working copy)
@@ -8496,6 +8496,7 @@
const String& target_name,
intptr_t id,
intptr_t num_args_tested) {
+ ASSERT(num_args_tested > 0);
const Class& cls = Class::Handle(Object::icdata_class());
ASSERT(!cls.IsNull());
ICData& result = ICData::Handle();
@@ -8511,7 +8512,7 @@
result.set_id(id);
result.set_num_args_tested(num_args_tested);
// Number of array elements in one test entry (num_args_tested + 1)
- intptr_t len = num_args_tested + 1;
+ intptr_t len = result.TestEntryLength();
// IC data array must be null terminated (sentinel entry).
Array& ic_data = Array::Handle(Array::New(len, Heap::kOld));
result.set_ic_data(ic_data);
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698