Ensure that external symbols have hash codes.
authorager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 18 Nov 2008 10:55:50 +0000 (10:55 +0000)
committerager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 18 Nov 2008 10:55:50 +0000 (10:55 +0000)
Review URL: http://codereview.chromium.org/11443

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/heap.cc

index 27b3945..804e525 100644 (file)
@@ -2142,6 +2142,8 @@ Object* Heap::AllocateExternalSymbol(Vector<const char> string, int chars) {
   // Patch the resource pointer of the result.
   ExternalTwoByteString* result = ExternalTwoByteString::cast(obj);
   result->set_resource(resource);
+  // Force hash code to be computed.
+  result->Hash();
   ASSERT(result->IsEqualTo(string));
   return result;
 }