-
levin@chromium.org authored
Reviewed by David Levin. Cache v8 strings when converting from WebCore::String to v8 string. https://bugs.webkit.org/show_bug.cgi?id=27655 * bindings/v8/V8Binding.cpp: (WebCore::v8String): now just immediately calls v8ExternalString (WebCore::enableStringImplCache): enables caching of conversions from WebCore::StringImpl to v8::String (WebCore::makeExternalString): utilty function to create external v8::String out of WebCore::String (WebCore::getStringCache): static function to access string cache (WebCore::cachedStringCallback): callback for weak handles of v8::Strings stored in the cache (WebCore::v8ExternalString): if caching enabled, checks if there is already v8::String for the given WebCore::StringImpl. If present, returns it, otherwise creates a new v8 external string. * bindings/v8/V8Binding.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
a8c2e78e