Revision: 15899
Author:   [email protected]
Date:     Fri Jul 26 03:45:47 2013
Log:      Merged r15898 into trunk branch.

Revert "Check that ExternalString objects get aligned resources" (r15894).

[email protected]

Review URL: https://codereview.chromium.org/20560006
http://code.google.com/p/v8/source/detail?r=15899

Modified:
 /trunk/src/api.cc
 /trunk/src/version.cc

=======================================
--- /trunk/src/api.cc   Fri Jul 26 03:27:09 2013
+++ /trunk/src/api.cc   Fri Jul 26 03:45:47 2013
@@ -779,8 +779,8 @@
 }


-static i::Smi* EncodeAlignedAsSmi(const void* value, const char* location) { - i::Smi* smi = const_cast<i::Smi*>(reinterpret_cast<const i::Smi*>(value));
+static i::Smi* EncodeAlignedAsSmi(void* value, const char* location) {
+  i::Smi* smi = reinterpret_cast<i::Smi*>(value);
   ApiCheck(smi->IsSmi(), location, "Pointer is not aligned");
   return smi;
 }
@@ -5937,10 +5937,6 @@
   LOG_API(isolate, "String::NewExternal");
   ENTER_V8(isolate);
   CHECK(resource && resource->data());
-  // Resource pointers need to look like Smis since ExternalString objects
- // are sometimes put into old pointer space (see i::String::MakeExternal).
-  CHECK(EncodeAlignedAsSmi(resource, "v8::String::NewExternal()"));
-  CHECK(EncodeAlignedAsSmi(resource->data(), "v8::String::NewExternal()"));
   i::Handle<i::String> result = NewExternalStringHandle(isolate, resource);
   isolate->heap()->external_string_table()->AddString(*result);
   return Utils::ToLocal(result);
@@ -5962,10 +5958,6 @@
     return false;
   }
   CHECK(resource && resource->data());
-  // Resource pointers need to look like Smis since ExternalString objects
- // are sometimes put into old pointer space (see i::String::MakeExternal).
-  CHECK(EncodeAlignedAsSmi(resource, "v8::String::MakeExternal()"));
- CHECK(EncodeAlignedAsSmi(resource->data(), "v8::String::MakeExternal()"));
   bool result = obj->MakeExternal(resource);
   if (result && !obj->IsInternalizedString()) {
     isolate->heap()->external_string_table()->AddString(*obj);
@@ -5981,10 +5973,6 @@
   LOG_API(isolate, "String::NewExternal");
   ENTER_V8(isolate);
   CHECK(resource && resource->data());
-  // Resource pointers need to look like Smis since ExternalString objects
- // are sometimes put into old pointer space (see i::String::MakeExternal).
-  CHECK(EncodeAlignedAsSmi(resource, "v8::String::NewExternal()"));
-  CHECK(EncodeAlignedAsSmi(resource->data(), "v8::String::NewExternal()"));
i::Handle<i::String> result = NewExternalAsciiStringHandle(isolate, resource);
   isolate->heap()->external_string_table()->AddString(*result);
   return Utils::ToLocal(result);
@@ -6007,10 +5995,6 @@
     return false;
   }
   CHECK(resource && resource->data());
-  // Resource pointers need to look like Smis since ExternalString objects
- // are sometimes put into old pointer space (see i::String::MakeExternal).
-  CHECK(EncodeAlignedAsSmi(resource, "v8::String::MakeExternal()"));
- CHECK(EncodeAlignedAsSmi(resource->data(), "v8::String::MakeExternal()"));
   bool result = obj->MakeExternal(resource);
   if (result && !obj->IsInternalizedString()) {
     isolate->heap()->external_string_table()->AddString(*obj);
=======================================
--- /trunk/src/version.cc       Fri Jul 26 03:27:09 2013
+++ /trunk/src/version.cc       Fri Jul 26 03:45:47 2013
@@ -35,7 +35,7 @@
 #define MAJOR_VERSION     3
 #define MINOR_VERSION     20
 #define BUILD_NUMBER      9
-#define PATCH_LEVEL       0
+#define PATCH_LEVEL       1
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
 #define IS_CANDIDATE_VERSION 0

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to