summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/bindings/v8/DOMDataStore.cpp
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-08 14:30:41 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-12 13:49:54 +0200
commitab0a50979b9eb4dfa3320eff7e187e41efedf7a9 (patch)
tree498dfb8a97ff3361a9f7486863a52bb4e26bb898 /chromium/third_party/WebKit/Source/bindings/v8/DOMDataStore.cpp
parent4ce69f7403811819800e7c5ae1318b2647e778d1 (diff)
Update Chromium to beta version 37.0.2062.68
Change-Id: I188e3b5aff1bec75566014291b654eb19f5bc8ca Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'chromium/third_party/WebKit/Source/bindings/v8/DOMDataStore.cpp')
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/DOMDataStore.cpp27
1 files changed, 4 insertions, 23 deletions
diff --git a/chromium/third_party/WebKit/Source/bindings/v8/DOMDataStore.cpp b/chromium/third_party/WebKit/Source/bindings/v8/DOMDataStore.cpp
index fcfb12f00e7..c9ef7c4195c 100644
--- a/chromium/third_party/WebKit/Source/bindings/v8/DOMDataStore.cpp
+++ b/chromium/third_party/WebKit/Source/bindings/v8/DOMDataStore.cpp
@@ -37,40 +37,21 @@
namespace WebCore {
-DOMDataStore::DOMDataStore(WrapperWorldType type)
- : m_type(type)
+DOMDataStore::DOMDataStore(bool isMainWorld)
+ : m_isMainWorld(isMainWorld)
, m_wrapperMap(v8::Isolate::GetCurrent()) // FIXME Don't call GetCurrent twice.
{
- V8PerIsolateData::current()->registerDOMDataStore(this);
}
DOMDataStore::~DOMDataStore()
{
- ASSERT(m_type != MainWorld); // We never actually destruct the main world's DOMDataStore.
- V8PerIsolateData::current()->unregisterDOMDataStore(this);
+ ASSERT(!m_isMainWorld); // We never actually destruct the main world's DOMDataStore.
m_wrapperMap.clear();
}
-DOMDataStore& DOMDataStore::mainWorldStore()
-{
- DEFINE_STATIC_LOCAL(DOMDataStore, mainWorldDOMDataStore, (MainWorld));
- ASSERT(isMainThread());
- return mainWorldDOMDataStore;
-}
-
DOMDataStore& DOMDataStore::current(v8::Isolate* isolate)
{
- V8PerIsolateData* data = isolate ? V8PerIsolateData::from(isolate) : V8PerIsolateData::current();
- if (UNLIKELY(!!data->workerDOMDataStore()))
- return *data->workerDOMDataStore();
-
- if (DOMWrapperWorld::isolatedWorldsExist()) {
- DOMWrapperWorld* isolatedWorld = DOMWrapperWorld::isolatedWorld(isolate->GetEnteredContext());
- if (UNLIKELY(!!isolatedWorld))
- return isolatedWorld->isolatedWorldDOMDataStore();
- }
-
- return mainWorldStore();
+ return DOMWrapperWorld::current(isolate).domDataStore();
}
} // namespace WebCore