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

Unified Diff: src/objects.cc

Issue 1334673003: Add instrumentation to track down a crasher (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: save receiver and push it before crashing Created 5 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 | « src/ic/ic.cc ('k') | no next file » | 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 c91ed7c5fd366c24c544b2e4a70637a56e8eabfc..ea60976897832732061238bbf8624e7c52ea396f 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -4804,16 +4804,12 @@ void JSObject::MigrateSlowToFast(Handle<JSObject> object,
int index = Smi::cast(iteration_order->get(i))->value();
Object* k = dictionary->KeyAt(index);
DCHECK(dictionary->IsKey(k));
+ // Dictionary keys are internalized upon insertion.
+ // TODO(jkummerow): Turn this into a DCHECK if it's not hit in the wild.
+ CHECK(k->IsUniqueName());
+ Handle<Name> key(Name::cast(k), isolate);
Object* value = dictionary->ValueAt(index);
- Handle<Name> key;
- if (k->IsSymbol()) {
- key = handle(Symbol::cast(k));
- } else {
- // Ensure the key is a unique name before writing into the
- // instance descriptor.
- key = factory->InternalizeString(handle(String::cast(k)));
- }
PropertyDetails details = dictionary->DetailsAt(index);
int enumeration_index = details.dictionary_index();
« no previous file with comments | « src/ic/ic.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698