[Webkit-unassigned] [Bug 63041] [Chromium][V8] Make DOMDataStore per-isolate

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 20 20:26:41 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=63041


Dmitry Lomov <dslomov at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |abarth at webkit.org,
                   |                            |antonm at chromium.org,
                   |                            |dimich at chromium.org,
                   |                            |dslomov at google.com,
                   |                            |vitalyr at chromium.org




--- Comment #1 from Dmitry Lomov <dslomov at google.com>  2011-06-20 20:26:41 PST ---
The hot spot for this work is getting current DOMDataStore.
I have been experimenting with various implementation, and the following strategy recovers all perf on Dromaeo/?dom on Linux:


Index: WebCore/bindings/v8/DOMData.cpp
===================================================================
--- WebCore/bindings/v8/DOMData.cpp     (revision 89232)
+++ WebCore/bindings/v8/DOMData.cpp     (working copy)
@@ -53,12 +54,12 @@

 DOMDataStore& DOMData::getMainThreadStore()
 {
    // This is broken out as a separate non-virtual method from getStore()
    // so that it can be inlined by getCurrentMainThreadStore, which is
    // a hot spot in Dromaeo DOM tests.
-    V8IsolatedContext* context = V8IsolatedContext::getEntered();
-    if (UNLIKELY(context != 0))
-        return *context->world()->domDataStore();
+    DOMDataStore* currentDOMDataStore = V8BindingPerIsolateData::current()->getDOMDataStore();
+    if (UNLIKELY(currentDOMDataStore != 0))
+        return *currentDOMDataStore;
     return m_defaultStore;
 }

I spare you all the gory details, but the idea is that:
1) current active DOMDataStore is saved in V8BindingPerIsolateData unless we are in main world
2) required changes include updating current DOMDataStore in per-isolate data on entering and exiting isolated worlds.
3) I keep m_defaultStore so that I do not have to reason about initialization order, but with the appearance of single V8 intitialization point in WebScriptController::inititialize, I might as well remove it too, and the whole function will then be  
      return *V8BindingPerIsolateData::current()->getDOMDataStore();

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list