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

Unified Diff: trunk/Source/bindings/v8/DOMWrapperWorld.h

Issue 218813002: Revert 170357 "Revert of Make DOMWrapperWorld::current() return ..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 9 months 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 | « trunk/Source/bindings/v8/DOMRequestState.h ('k') | trunk/Source/bindings/v8/DOMWrapperWorld.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/bindings/v8/DOMWrapperWorld.h
===================================================================
--- trunk/Source/bindings/v8/DOMWrapperWorld.h (revision 170423)
+++ trunk/Source/bindings/v8/DOMWrapperWorld.h (working copy)
@@ -69,26 +69,25 @@
static bool isolatedWorldsExist() { return isolatedWorldCount; }
static void allWorldsInMainThread(Vector<RefPtr<DOMWrapperWorld> >& worlds);
- static DOMWrapperWorld* world(v8::Handle<v8::Context> context)
+ static DOMWrapperWorld& world(v8::Handle<v8::Context> context)
{
ASSERT(!context.IsEmpty());
return V8PerContextData::world(context);
}
- // Will return null if there is no DOMWrapperWorld for the current context.
- static DOMWrapperWorld* current(v8::Isolate* isolate)
+ static DOMWrapperWorld& current(v8::Isolate* isolate)
{
if (isMainThread() && worldOfInitializingWindow) {
// It's possible that current() is being called while window is being initialized.
// In order to make current() workable during the initialization phase,
// we cache the world of the initializing window on worldOfInitializingWindow.
// If there is no initiazing window, worldOfInitializingWindow is 0.
- return worldOfInitializingWindow;
+ return *worldOfInitializingWindow;
}
return world(isolate->GetCurrentContext());
}
- static DOMWrapperWorld* mainWorld();
+ static DOMWrapperWorld& mainWorld();
// Associates an isolated world (see above for description) with a security
// origin. XMLHttpRequest instances used in that world will be considered
« no previous file with comments | « trunk/Source/bindings/v8/DOMRequestState.h ('k') | trunk/Source/bindings/v8/DOMWrapperWorld.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698