From cf6fd5b507b76c0787206a1642c66c61b2e58bec Mon Sep 17 00:00:00 2001 From: "iposva@chromium.org" Date: Tue, 17 Feb 2009 23:33:29 +0000 Subject: Backout r9871 because it in mysterious ways causes a international page cycler regression. TBR=darin Review URL: http://codereview.chromium.org/20436 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9919 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/port/bindings/v8/v8_binding.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/webkit/port/bindings/v8/v8_binding.h b/webkit/port/bindings/v8/v8_binding.h index 553364c..5f83e51 100644 --- a/webkit/port/bindings/v8/v8_binding.h +++ b/webkit/port/bindings/v8/v8_binding.h @@ -48,8 +48,9 @@ class WebCoreStringResource: public v8::String::ExternalStringResource { // Convert a v8::String to a WebCore::String. If the V8 string is not already // an external string then it is transformed into an external string at this // point to avoid repeated conversions. -inline String ToWebCoreString(v8::Handle obj, - bool atomic = false) { +inline String ToWebCoreString(v8::Handle obj) { + bool morph = false; + bool atomic = false; v8::TryCatch block; v8::Local v8_str = obj->ToString(); if (v8_str.IsEmpty()) @@ -78,10 +79,12 @@ inline String ToWebCoreString(v8::Handle obj, } else { result = StringImpl::adopt(buf); } - WebCoreStringResource* resource = new WebCoreStringResource(result); - if (!v8_str->MakeExternal(resource)) { - // In case of a failure delete the external resource as it was not used. - delete resource; + if (morph) { + WebCoreStringResource* resource = new WebCoreStringResource(result); + if (!v8_str->MakeExternal(resource)) { + // In case of a failure delete the external resource as it was not used. + delete resource; + } } return result; } -- cgit v1.1