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

Unified Diff: src/objects.cc

Issue 577233002: Version 3.28.71.10 (merged r23727) (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.28
Patch Set: Created 6 years, 3 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 | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index b668916a57732d859fbb2e6f821319d6ed188520..75b5860f8ef63bf9d45f9b0f917b0f6702b38c04 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -4730,9 +4730,15 @@ void JSObject::MigrateSlowToFast(Handle<JSObject> object,
void JSObject::ResetElements(Handle<JSObject> object) {
- Heap* heap = object->GetIsolate()->heap();
- CHECK(object->map() != heap->sloppy_arguments_elements_map());
- object->set_elements(object->map()->GetInitialElements());
+ Isolate* isolate = object->GetIsolate();
+ CHECK(object->map() != isolate->heap()->sloppy_arguments_elements_map());
+ if (object->map()->has_dictionary_elements()) {
+ Handle<SeededNumberDictionary> new_elements =
+ SeededNumberDictionary::New(isolate, 0);
+ object->set_elements(*new_elements);
+ } else {
+ object->set_elements(object->map()->GetInitialElements());
+ }
}
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698