Add a data member (and getter, setter methods) to V8PerContextData that holds a pointer to V8DOMActivityLogger. This member is set while initializing the context for a V8DOMWindowShell. Ownership of the pointer is still retained by the HashMap in DOMWrapperWorld.
Subsequent patches (addressing Bug: 107207) will then obtain a reference to the V8DOMActivityLogger directly from PerContextData attached to the current context. The assumption is that this is faster than getting the reference from the HashMap in DOMWrapperWorld
Created attachment 193953 [details] Patch
Comment on attachment 193953 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=193953&action=review Looks OK > Source/WebCore/ChangeLog:16 > + Cache a pointer to V8DOMActivityLogger in PerContextData. > + Adds a data member (and getter, setter methods) to V8PerContextData > + that holds a pointer to a V8DOMActivityLogger. This member is set while > + initializing the context for a V8DOMWindowShell. Ownership of the pointer > + is still retained by the HashMap in DOMWrapperWorld. > + As a result of this patch, subsequent patches that will implement logging > + for DOM API access (See bug 107207) will be able to obtain a reference to > + the logger directly from PerContextData. This will benefit performance as it > + will be faster than looking up the logger in the HashMap in DOMWrapperWorld. > + https://bugs.webkit.org/show_bug.cgi?id=112719 > + > + Reviewed by NOBODY (OOPS!). > + > + There are no new tests as there is no change in behavior. Nit: In WebKit we write a bug title (which should be in one line), a bug URL, a bug description, and a test, in this order. Please fix it before landing. > Source/WebCore/bindings/v8/V8PerContextData.h:128 > + V8DOMActivityLogger* m_activityLogger; Would you add a comment about the lifetime?
Created attachment 193960 [details] Patch
Comment on attachment 193960 [details] Patch Thanks!
Comment on attachment 193960 [details] Patch Clearing flags on attachment: 193960 Committed r146295: <http://trac.webkit.org/changeset/146295>
All reviewed patches have been landed. Closing bug.