Changeset 134029 in webkit
- Timestamp:
- Nov 9, 2012 1:11:12 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r134028 r134029 1 2012-11-09 Dan Carney <dcarney@google.com> 2 3 [V8] Main world should have one DOMDataStore 4 https://bugs.webkit.org/show_bug.cgi?id=101470 5 6 Reviewed by Kentaro Hara. 7 8 The main world DOMWrapperWorld held onto a DOMDataStore that should 9 never be used, as there is a static one optimized for speed in 10 DOMDataStore. 11 12 No new tests. No change in functionality. 13 14 * bindings/v8/DOMDataStore.cpp: 15 (WebCore::DOMDataStore::current): 16 * bindings/v8/DOMWrapperWorld.h: 17 (WebCore::DOMWrapperWorld::isolatedWorldDomDataStore): 18 (WebCore::DOMWrapperWorld::DOMWrapperWorld): 19 * bindings/v8/V8DOMWrapper.h: 20 (WebCore::V8DOMWrapper::getCachedWrapper): 21 1 22 2012-11-09 Alexei Filippov <alph@chromium.org> 2 23 -
trunk/Source/WebCore/bindings/v8/DOMDataStore.cpp
r133909 r134029 55 55 DOMDataStore* DOMDataStore::current(v8::Isolate* isolate) 56 56 { 57 DEFINE_STATIC_LOCAL(DOMDataStore, defaultStore, (MainWorld));57 DEFINE_STATIC_LOCAL(DOMDataStore, mainWorldDOMDataStore, (MainWorld)); 58 58 V8PerIsolateData* data = isolate ? V8PerIsolateData::from(isolate) : V8PerIsolateData::current(); 59 59 if (UNLIKELY(!!data->domDataStore())) … … 61 61 V8DOMWindowShell* context = V8DOMWindowShell::getEntered(); 62 62 if (UNLIKELY(!!context)) 63 return context->world()-> domDataStore();64 return & defaultStore;63 return context->world()->isolatedWorldDOMDataStore(); 64 return &mainWorldDOMDataStore; 65 65 } 66 66 -
trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h
r133909 r134029 75 75 static PassRefPtr<DOMWrapperWorld> createUninitializedWorld(); 76 76 77 bool isMainWorld() { return m_worldId == mainWorldId; }78 bool isIsolatedWorld() { return isIsolatedWorldId(m_worldId); }77 bool isMainWorld() const { return m_worldId == mainWorldId; } 78 bool isIsolatedWorld() const { return isIsolatedWorldId(m_worldId); } 79 79 int worldId() const { return m_worldId; } 80 80 int extensionGroup() const { return m_extensionGroup; } 81 DOMDataStore* domDataStore() const81 DOMDataStore* isolatedWorldDOMDataStore() const 82 82 { 83 ASSERT( m_worldId != uninitializedWorldId);83 ASSERT(isIsolatedWorld()); 84 84 return m_domDataStore.get(); 85 85 } … … 99 99 , m_extensionGroup(extensionGroup) 100 100 { 101 if ( worldId != uninitializedWorldId)101 if (isIsolatedWorld()) 102 102 m_domDataStore = adoptPtr(new DOMDataStore(DOMDataStore::IsolatedWorld)); 103 103 } -
trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h
r133954 r134029 123 123 return node->wrapper(); 124 124 125 return context->world()-> domDataStore()->get(node);125 return context->world()->isolatedWorldDOMDataStore()->get(node); 126 126 } 127 127
Note: See TracChangeset
for help on using the changeset viewer.