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

Unified Diff: src/objects.cc

Issue 256743008: OrderedHashMap::Lookup() and ObjectHashTable::Lookup() handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebasing Created 6 years, 8 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/objects.h ('k') | src/runtime.cc » ('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 6a808c4a0fee33e59d9a895fb691e73a79fe69db..a0ffcd92be72fc1275a5ef8d64a81edb9d395b74 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -5187,7 +5187,7 @@ Object* JSObject::GetHiddenProperty(Handle<Name> key) {
if (inline_value->IsUndefined()) return GetHeap()->the_hole_value();
ObjectHashTable* hashtable = ObjectHashTable::cast(inline_value);
- Object* entry = hashtable->Lookup(*key);
+ Object* entry = hashtable->Lookup(key);
return entry;
}
@@ -16036,8 +16036,9 @@ Object* Dictionary<Derived, Shape, Key>::SlowReverseLookup(Object* value) {
}
-Object* ObjectHashTable::Lookup(Object* key) {
- ASSERT(IsKey(key));
+Object* ObjectHashTable::Lookup(Handle<Object> key) {
+ DisallowHeapAllocation no_gc;
+ ASSERT(IsKey(*key));
// If the object does not have an identity hash, it was never used as a key.
Object* hash = key->GetHash();
@@ -16411,8 +16412,9 @@ Handle<OrderedHashSet> OrderedHashSet::Remove(Handle<OrderedHashSet> table,
}
-Object* OrderedHashMap::Lookup(Object* key) {
- int entry = FindEntry(key);
+Object* OrderedHashMap::Lookup(Handle<Object> key) {
+ DisallowHeapAllocation no_gc;
+ int entry = FindEntry(*key);
if (entry == kNotFound) return GetHeap()->the_hole_value();
return ValueAt(entry);
}
« no previous file with comments | « src/objects.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698