From 0628775c4eff4201d7fe5225aff072936fd0bb25 Mon Sep 17 00:00:00 2001 From: "ishell@chromium.org" Date: Fri, 25 Apr 2014 16:02:50 +0000 Subject: [PATCH] Fix for a GC-stress failures after r20987. R=verwaest@chromium.org Review URL: https://codereview.chromium.org/253513004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20992 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/factory.cc | 11 ++++------- src/factory.h | 3 +-- src/objects.cc | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/factory.cc b/src/factory.cc index 81e93ed..32ff424 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 1e40ccd..041c986 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 dd1daf3..08f4a44 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) { -- 2.7.4