Allow externalizing cons and sliced string.
authoryangguo@chromium.org <yangguo@chromium.org>
Wed, 10 Sep 2014 08:47:16 +0000 (08:47 +0000)
committeryangguo@chromium.org <yangguo@chromium.org>
Wed, 10 Sep 2014 08:47:16 +0000 (08:47 +0000)
Fulfill overdue TODO.

R=mstarzinger@chromium.org

Committed: https://code.google.com/p/v8/source/detail?r=23058

Review URL: https://codereview.chromium.org/460643002

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

src/api.cc

index 8a9a5af..06a8f79 100644 (file)
@@ -5566,11 +5566,6 @@ bool v8::String::CanMakeExternal() {
   i::Handle<i::String> obj = Utils::OpenHandle(this);
   i::Isolate* isolate = obj->GetIsolate();
 
-  // TODO(yangguo): Externalizing sliced/cons strings allocates.
-  // This rule can be removed when all code that can
-  // trigger an access check is handlified and therefore GC safe.
-  if (isolate->heap()->old_pointer_space()->Contains(*obj)) return false;
-
   if (isolate->string_tracker()->IsFreshUnusedString(obj)) return false;
   int size = obj->Size();  // Byte size of the original string.
   if (size < i::ExternalString::kShortSize) return false;