Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Unified Diff: Source/bindings/v8/DOMDataStore.cpp

Issue 68173017: Have DOMDataStore::current() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/DOMDataStore.h ('k') | Source/bindings/v8/DOMWrapperWorld.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/DOMDataStore.cpp
diff --git a/Source/bindings/v8/DOMDataStore.cpp b/Source/bindings/v8/DOMDataStore.cpp
index bbcac2b337fa65c7b8ec91c1e99134132eef33a2..2626f5c9af9c1533bf072377e88eec4afe42e44e 100644
--- a/Source/bindings/v8/DOMDataStore.cpp
+++ b/Source/bindings/v8/DOMDataStore.cpp
@@ -51,18 +51,18 @@ DOMDataStore::~DOMDataStore()
m_wrapperMap.clear();
}
-DOMDataStore* DOMDataStore::mainWorldStore()
+DOMDataStore& DOMDataStore::mainWorldStore()
{
DEFINE_STATIC_LOCAL(DOMDataStore, mainWorldDOMDataStore, (MainWorld));
ASSERT(isMainThread());
- return &mainWorldDOMDataStore;
+ return mainWorldDOMDataStore;
}
-DOMDataStore* DOMDataStore::current(v8::Isolate* isolate)
+DOMDataStore& DOMDataStore::current(v8::Isolate* isolate)
{
V8PerIsolateData* data = isolate ? V8PerIsolateData::from(isolate) : V8PerIsolateData::current();
if (UNLIKELY(!!data->workerDOMDataStore()))
- return data->workerDOMDataStore();
+ return *data->workerDOMDataStore();
if (DOMWrapperWorld::isolatedWorldsExist()) {
DOMWrapperWorld* isolatedWorld = DOMWrapperWorld::isolatedWorld(v8::Context::GetEntered());
« no previous file with comments | « Source/bindings/v8/DOMDataStore.h ('k') | Source/bindings/v8/DOMWrapperWorld.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698