RESOLVED FIXED 104206
[V8] Optimize v8StringOrNull() and v8StringOrUndefined()
https://bugs.webkit.org/show_bug.cgi?id=104206
Summary [V8] Optimize v8StringOrNull() and v8StringOrUndefined()
Kentaro Hara
Reported 2012-12-05 21:17:27 PST
Currently v8StringOrNull() and v8StringOrUndefined() are checking a null string twice. It is redundant.
Attachments
Patch (2.66 KB, patch)
2012-12-05 21:18 PST, Kentaro Hara
no flags
Kentaro Hara
Comment 1 2012-12-05 21:18:54 PST
Adam Barth
Comment 2 2012-12-05 21:26:26 PST
Comment on attachment 177921 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=177921&action=review > Source/WebCore/bindings/v8/V8Binding.h:161 > + if (UNLIKELY(!isolate)) > + isolate = v8::Isolate::GetCurrent(); Some day we'll make isolate mandatory and remove all these branches.
Kentaro Hara
Comment 3 2012-12-05 21:28:28 PST
(In reply to comment #2) > (From update of attachment 177921 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=177921&action=review > > > Source/WebCore/bindings/v8/V8Binding.h:161 > > + if (UNLIKELY(!isolate)) > > + isolate = v8::Isolate::GetCurrent(); > > Some day we'll make isolate mandatory and remove all these branches. I'm doing it today:) Actually all call sites of v8StringOrNull() and v8StringOrUndefined() have an isolate. Almost all call sites of v8String() have an isolate. (I'll add v8StringWithCheck(), which has an isolate check, and will use it for call sites that don't have an isolate.)
Kentaro Hara
Comment 4 2012-12-05 21:32:17 PST
Also I've implemented an isolate-version V8 APIs for Local<T>::New() and IsWeak(), which will land this week or next week. It will speed up v8String() and others.
WebKit Review Bot
Comment 5 2012-12-05 21:48:46 PST
Comment on attachment 177921 [details] Patch Clearing flags on attachment: 177921 Committed r136797: <http://trac.webkit.org/changeset/136797>
WebKit Review Bot
Comment 6 2012-12-05 21:48:49 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.