Commit f822b905 authored by eric@webkit.org's avatar eric@webkit.org
Browse files

2009-12-02 Anton Muhin <antonm@chromium.org>

        Reviewed by Adam Barth.:w

        Allow to skip thread checks when accessing DOMDataStore for processes
        which run V8 in single thread mode.
        https://bugs.webkit.org/show_bug.cgi?id=31877

        Should be covered by buildbots.

        * bindings/v8/V8DOMMap.cpp:
        (WebCore::getDOMDataStore):
        (WebCore::enableFasterDOMStoreAccess):
        (WebCore::getDOMNodeMap):
        (WebCore::getDOMObjectMap):
        (WebCore::getActiveDOMObjectMap):
        (WebCore::getDOMSVGElementInstanceMap):
        (WebCore::getDOMSVGObjectWithContextMap):
        * bindings/v8/V8DOMMap.h:
2009-12-02  Anton Muhin  <antonm@chromium.org>

        Reviewed by Adam Barth.

        Allow to skip thread checks when accessing DOMDataStore for processes
        which run V8 in single thread mode.
        https://bugs.webkit.org/show_bug.cgi?id=31877

        * src/WebScriptController.cpp:
        (WebKit::WebScriptController::enableV8SingleThreadMode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2aadf6dc
2009-12-02 Anton Muhin <antonm@chromium.org>
Reviewed by Adam Barth.:w
Allow to skip thread checks when accessing DOMDataStore for processes
which run V8 in single thread mode.
https://bugs.webkit.org/show_bug.cgi?id=31877
Should be covered by buildbots.
* bindings/v8/V8DOMMap.cpp:
(WebCore::getDOMDataStore):
(WebCore::enableFasterDOMStoreAccess):
(WebCore::getDOMNodeMap):
(WebCore::getDOMObjectMap):
(WebCore::getActiveDOMObjectMap):
(WebCore::getDOMSVGElementInstanceMap):
(WebCore::getDOMSVGObjectWithContextMap):
* bindings/v8/V8DOMMap.h:
2009-12-02 Yury Semikhatsky <yurys@chromium.org>
 
Reviewed by Pavel Feldman.
......@@ -48,32 +48,49 @@ DOMDataStoreHandle::~DOMDataStoreHandle()
{
}
static bool fasterDOMStoreAccess = false;
static inline DOMDataStore& getDOMDataStore()
{
if (LIKELY(fasterDOMStoreAccess)) {
ASSERT(WTF::isMainThread());
return MainThreadDOMData::getCurrentMainThreadStore();
}
return DOMData::getCurrent()->getStore();
}
void enableFasterDOMStoreAccess()
{
fasterDOMStoreAccess = true;
}
DOMWrapperMap<Node>& getDOMNodeMap()
{
return MainThreadDOMData::getCurrentMainThreadStore().domNodeMap();
return getDOMDataStore().domNodeMap();
}
DOMWrapperMap<void>& getDOMObjectMap()
{
return DOMData::getCurrent()->getStore().domObjectMap();
return getDOMDataStore().domObjectMap();
}
DOMWrapperMap<void>& getActiveDOMObjectMap()
{
return DOMData::getCurrent()->getStore().activeDomObjectMap();
return getDOMDataStore().activeDomObjectMap();
}
#if ENABLE(SVG)
DOMWrapperMap<SVGElementInstance>& getDOMSVGElementInstanceMap()
{
return DOMData::getCurrent()->getStore().domSvgElementInstanceMap();
return getDOMDataStore().domSvgElementInstanceMap();
}
// Map of SVG objects with contexts to V8 objects
DOMWrapperMap<void>& getDOMSVGObjectWithContextMap()
{
return DOMData::getCurrent()->getStore().domSvgObjectWithContextMap();
return getDOMDataStore().domSvgObjectWithContextMap();
}
#endif // ENABLE(SVG)
......
......@@ -139,6 +139,8 @@ namespace WebCore {
DOMWrapperMap<void>& getDOMSVGObjectWithContextMap();
void visitDOMSVGObjectsInCurrentThread(DOMWrapperMap<void>::Visitor*);
#endif
void enableFasterDOMStoreAccess();
} // namespace WebCore
#endif // V8DOMMap_h
2009-12-02 Anton Muhin <antonm@chromium.org>
Reviewed by Adam Barth.
Allow to skip thread checks when accessing DOMDataStore for processes
which run V8 in single thread mode.
https://bugs.webkit.org/show_bug.cgi?id=31877
* src/WebScriptController.cpp:
(WebKit::WebScriptController::enableV8SingleThreadMode):
2009-12-01 Peter Kasting <pkasting@google.com>
Reviewed by Darin Fisher.
......
......@@ -32,6 +32,7 @@
#include "WebScriptController.h"
#include "V8Binding.h"
#include "V8DOMMap.h"
#include "V8Proxy.h"
#include "WebString.h"
......@@ -60,6 +61,7 @@ void WebScriptController::registerExtension(v8::Extension* extension,
void WebScriptController::enableV8SingleThreadMode()
{
enableStringImplCache();
enableFasterDOMStoreAccess();
}
void WebScriptController::flushConsoleMessages()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment