Fix for a GC-stress failures after r20987.
authorishell@chromium.org <ishell@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 25 Apr 2014 16:02:50 +0000 (16:02 +0000)
committerishell@chromium.org <ishell@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 25 Apr 2014 16:02:50 +0000 (16:02 +0000)
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
src/factory.h
src/objects.cc

index 81e93ed..32ff424 100644 (file)
@@ -89,7 +89,7 @@ Handle<FixedArray> Factory::NewUninitializedFixedArray(int size) {
 
 
 Handle<FixedArrayBase> Factory::NewFixedDoubleArray(int size,
-                                                      PretenureFlag pretenure) {
+                                                    PretenureFlag pretenure) {
   ASSERT(0 <= size);
   CALL_HEAP_FUNCTION(
       isolate(),
@@ -311,18 +311,15 @@ MUST_USE_RESULT Handle<String> Factory::NewTwoByteInternalizedString(
 }
 
 
-template<typename T>
 Handle<String> Factory::NewInternalizedStringImpl(
-    T t, int chars, uint32_t hash_field) {
+    Handle<String> 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<String> Factory::NewInternalizedStringImpl(String*, int, uint32_t);
-
 
 MaybeHandle<Map> Factory::InternalizedStringMapForString(
     Handle<String> string) {
index 1e40ccd..041c986 100644 (file)
@@ -160,9 +160,8 @@ class Factory V8_FINAL {
         Vector<const uc16> str,
         uint32_t hash_field);
 
-  template<typename T>
   MUST_USE_RESULT Handle<String> NewInternalizedStringImpl(
-      T t, int chars, uint32_t hash_field);
+      Handle<String> 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.
index dd1daf3..08f4a44 100644 (file)
@@ -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) {