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

Unified Diff: src/objects-inl.h

Issue 250773004: HashTableKey::AsObject() handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 19f7b65784e7b2e53979c71f8144f951ef47b647..911407e9dacfd614da9b620bf94d5aaf675a89d2 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -470,11 +470,6 @@ uc32 FlatStringReader::Get(int index) {
}
-Handle<Object> HashTableKey::AsHandle(Isolate* isolate) {
- CALL_HEAP_FUNCTION(isolate, AsObject(isolate->heap()), Object);
-}
-
-
Handle<Object> StringTableShape::AsHandle(Isolate* isolate, HashTableKey* key) {
return key->AsHandle(isolate);
}
@@ -532,7 +527,7 @@ class OneByteStringKey : public SequentialStringKey<uint8_t> {
return String::cast(string)->IsOneByteEqualTo(string_);
}
- virtual MaybeObject* AsObject(Heap* heap) V8_OVERRIDE;
+ virtual Handle<Object> AsHandle(Isolate* isolate) V8_OVERRIDE;
};
@@ -563,7 +558,7 @@ class SubStringKey : public HashTableKey {
}
virtual bool IsMatch(Object* string) V8_OVERRIDE;
- virtual MaybeObject* AsObject(Heap* heap) V8_OVERRIDE;
+ virtual Handle<Object> AsHandle(Isolate* isolate) V8_OVERRIDE;
private:
const Char* GetChars();
@@ -592,7 +587,7 @@ class TwoByteStringKey : public SequentialStringKey<uc16> {
return String::cast(string)->IsTwoByteEqualTo(string_);
}
- virtual MaybeObject* AsObject(Heap* heap) V8_OVERRIDE;
+ virtual Handle<Object> AsHandle(Isolate* isolate) V8_OVERRIDE;
};
@@ -618,11 +613,10 @@ class Utf8StringKey : public HashTableKey {
return String::cast(other)->Hash();
}
- virtual MaybeObject* AsObject(Heap* heap) V8_OVERRIDE {
+ virtual Handle<Object> AsHandle(Isolate* isolate) V8_OVERRIDE {
if (hash_field_ == 0) Hash();
- return heap->AllocateInternalizedStringFromUtf8(string_,
- chars_,
- hash_field_);
+ return isolate->factory()->NewInternalizedStringFromUtf8(
+ string_, chars_, hash_field_);
}
Vector<const char> string_;
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698