diff --git a/src/factory.cc b/src/factory.cc index 81e93ed6a0..32ff4244ab 100644 --- a/src/factory.cc +++ b/src/factory.cc @@ -89,7 +89,7 @@ Handle Factory::NewUninitializedFixedArray(int size) { Handle Factory::NewFixedDoubleArray(int size, - PretenureFlag pretenure) { + PretenureFlag pretenure) { ASSERT(0 <= size); CALL_HEAP_FUNCTION( isolate(), @@ -311,18 +311,15 @@ MUST_USE_RESULT Handle Factory::NewTwoByteInternalizedString( } -template Handle Factory::NewInternalizedStringImpl( - T t, int chars, uint32_t hash_field) { + Handle string, int chars, uint32_t hash_field) { CALL_HEAP_FUNCTION( isolate(), - isolate()->heap()->AllocateInternalizedStringImpl(t, chars, hash_field), + isolate()->heap()->AllocateInternalizedStringImpl( + *string, chars, hash_field), String); } -template -Handle Factory::NewInternalizedStringImpl(String*, int, uint32_t); - MaybeHandle Factory::InternalizedStringMapForString( Handle string) { diff --git a/src/factory.h b/src/factory.h index 1e40ccd6e9..041c986975 100644 --- a/src/factory.h +++ b/src/factory.h @@ -160,9 +160,8 @@ class Factory V8_FINAL { Vector str, uint32_t hash_field); - template MUST_USE_RESULT Handle NewInternalizedStringImpl( - T t, int chars, uint32_t hash_field); + Handle string, int chars, uint32_t hash_field); // Compute the matching internalized string map for a string if possible. // Empty handle is returned if string is in new space or not flattened. diff --git a/src/objects.cc b/src/objects.cc index dd1daf37ce..08f4a445b3 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -14527,7 +14527,7 @@ class InternalizedStringKey : public HashTableKey { } // Otherwise allocate a new internalized string. return isolate->factory()->NewInternalizedStringImpl( - *string_, string_->length(), string_->hash_field()); + string_, string_->length(), string_->hash_field()); } static uint32_t StringHash(Object* obj) {