Title: [136796] trunk/Source/WebCore
- Revision
- 136796
- Author
- hara...@chromium.org
- Date
- 2012-12-05 21:35:25 -0800 (Wed, 05 Dec 2012)
Log Message
[V8] Optimize v8String() for uninitialized DOM attributes
https://bugs.webkit.org/show_bug.cgi?id=104205
Reviewed by Adam Barth.
This patch makes uninitialized div.lang, div.title etc 6.3% faster.
[div.lang]
Before this patch: 12.6 ns
After this patch: 11.8 ns
* bindings/v8/V8Binding.h:
(WebCore::v8String):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (136795 => 136796)
--- trunk/Source/WebCore/ChangeLog 2012-12-06 05:09:37 UTC (rev 136795)
+++ trunk/Source/WebCore/ChangeLog 2012-12-06 05:35:25 UTC (rev 136796)
@@ -1,5 +1,21 @@
2012-12-05 Kentaro Hara <hara...@chromium.org>
+ [V8] Optimize v8String() for uninitialized DOM attributes
+ https://bugs.webkit.org/show_bug.cgi?id=104205
+
+ Reviewed by Adam Barth.
+
+ This patch makes uninitialized div.lang, div.title etc 6.3% faster.
+
+ [div.lang]
+ Before this patch: 12.6 ns
+ After this patch: 11.8 ns
+
+ * bindings/v8/V8Binding.h:
+ (WebCore::v8String):
+
+2012-12-05 Kentaro Hara <hara...@chromium.org>
+
[V8] Remove addImplicitReferencesForNodeWithEventListeners()
https://bugs.webkit.org/show_bug.cgi?id=104203
Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (136795 => 136796)
--- trunk/Source/WebCore/bindings/v8/V8Binding.h 2012-12-06 05:09:37 UTC (rev 136795)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.h 2012-12-06 05:35:25 UTC (rev 136796)
@@ -147,12 +147,11 @@
// underlying buffer alive while the string is still live in the V8 engine.
inline v8::Handle<v8::String> v8String(const String& string, v8::Isolate* isolate = 0)
{
- StringImpl* stringImpl = string.impl();
- if (!stringImpl)
- return isolate ? v8::String::Empty(isolate) : v8::String::Empty();
if (UNLIKELY(!isolate))
isolate = v8::Isolate::GetCurrent();
- return V8PerIsolateData::from(isolate)->stringCache()->v8ExternalString(stringImpl, isolate);
+ if (string.isNull())
+ return v8::String::Empty(isolate);
+ return V8PerIsolateData::from(isolate)->stringCache()->v8ExternalString(string.impl(), isolate);
}
inline v8::Handle<v8::Value> v8StringOrNull(const String& str, v8::Isolate* isolate = 0)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes