Changeset 146295 in webkit
- Timestamp:
- Mar 19, 2013, 7:38:54 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r146292 r146295 1 2013-03-19 Ankur Taly <ataly@google.com> 2 3 Cache a pointer to V8DOMActivityLogger in PerContextData. 4 https://bugs.webkit.org/show_bug.cgi?id=112719 5 6 Reviewed by Kentaro Hara. 7 8 Adds a data member (and getter, setter methods) to V8PerContextData 9 that holds a pointer to a V8DOMActivityLogger. This member is set while 10 initializing the context for a V8DOMWindowShell. Ownership of the pointer 11 is still retained by the HashMap in DOMWrapperWorld. 12 As a result of this patch, subsequent patches that will implement logging 13 for DOM API access (See bug 107207) will be able to obtain a reference to 14 the logger directly from PerContextData. This will benefit performance as it 15 will be faster than looking up the logger in the DOMActivityLoggerMap in 16 DOMWrapperWorld. 17 18 There are no new tests as there is no change in behavior. 19 20 * bindings/v8/V8DOMWindowShell.cpp: 21 (WebCore::V8DOMWindowShell::initializeIfNeeded): 22 * bindings/v8/V8PerContextData.h: 23 (WebCore::V8PerContextData::activityLogger): 24 (V8PerContextData): 25 (WebCore::V8PerContextData::setActivityLogger): 26 1 27 2013-03-19 Arnaud Renevier <a.renevier@sisa.samsung.com> 2 28 -
trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
r145765 r146295 240 240 return false; 241 241 } 242 242 m_perContextData->setActivityLogger(DOMWrapperWorld::activityLogger(m_world->worldId())); 243 243 if (!installDOMWindow()) { 244 244 disposeContext(); -
trunk/Source/WebCore/bindings/v8/V8PerContextData.h
r135601 r146295 33 33 34 34 #include "ScopedPersistent.h" 35 #include "V8DOMActivityLogger.h" 35 36 #include "WrapperTypeInfo.h" 36 37 #include <v8.h> … … 94 95 } 95 96 97 V8DOMActivityLogger* activityLogger() 98 { 99 return m_activityLogger; 100 } 101 102 void setActivityLogger(V8DOMActivityLogger* logger) 103 { 104 m_activityLogger = logger; 105 } 106 96 107 private: 97 108 explicit V8PerContextData(v8::Persistent<v8::Context> context) … … 114 125 115 126 V8NPObjectMap m_v8NPObjectMap; 116 127 // We cache a pointer to the V8DOMActivityLogger associated with the world 128 // corresponding to this context. The ownership of the pointer is retained 129 // by the DOMActivityLoggerMap in DOMWrapperWorld. 130 V8DOMActivityLogger* m_activityLogger; 117 131 v8::Persistent<v8::Context> m_context; 118 132 ScopedPersistent<v8::Value> m_errorPrototype;
Note:
See TracChangeset
for help on using the changeset viewer.