Commit 7da12e6a authored by levin@chromium.org's avatar levin@chromium.org

2009-08-12 David Levin <levin@chromium.org>

        No review, rolling out r47106.
        https://bugs.webkit.org/show_bug.cgi?id=28215

        This patch relied on a new version of v8 which is not available
        in chromium yet.

        * bindings/v8/V8Binding.cpp:
        (WebCore::v8StringToAtomicWebCoreString):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 86c1e31c
2009-08-12 David Levin <levin@chromium.org>
No review, rolling out r47106.
https://bugs.webkit.org/show_bug.cgi?id=28215
This patch relied on a new version of v8 which is not available
in chromium yet.
* bindings/v8/V8Binding.cpp:
(WebCore::v8StringToAtomicWebCoreString):
2009-08-12 Steve Block <steveblock@google.com>
Reviewed by Eric Seidel.
......@@ -154,12 +154,14 @@ AtomicString v8StringToAtomicWebCoreString(v8::Handle<v8::String> v8String)
{
WebCoreStringResource* stringResource = WebCoreStringResource::toStringResource(v8String);
if (!stringResource) {
if (!v8String->CanMakeExternal())
return v8StringToWebCoreString(v8String, DoNotExternalize, AtomicStringType);
// If this string hasn't been externalized, we force it now.
v8StringToWebCoreString(v8String, Externalize, AtomicStringType);
String plain = v8StringToWebCoreString(v8String, Externalize, AtomicStringType);
// If the string is empty there's no room to cache an atomic
// string so we bail out.
if (plain.isEmpty())
return plain;
stringResource = WebCoreStringResource::toStringResource(v8String);
ASSERT(stringResource);
ASSERT(stringResource != NULL);
}
return stringResource->atomicString();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment