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

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

Issue 182903003: Make DOMWrapperWorld::current() callable from workers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | « Source/bindings/v8/V8WindowShell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8WindowShell.cpp
diff --git a/Source/bindings/v8/V8WindowShell.cpp b/Source/bindings/v8/V8WindowShell.cpp
index 51dedc997afb9ec1a4c2900f0ebbc1dfa14f2f3d..194532a164da3cd1a63a3afbc0cef39219dac091 100644
--- a/Source/bindings/v8/V8WindowShell.cpp
+++ b/Source/bindings/v8/V8WindowShell.cpp
@@ -66,8 +66,6 @@
namespace WebCore {
-static bool contextBeingInitialized = false;
-
static void checkDocumentWrapper(v8::Handle<v8::Object> wrapper, Document* document)
{
ASSERT(V8Document::toNative(wrapper) == document);
@@ -185,10 +183,9 @@ bool V8WindowShell::initializeIfNeeded()
if (m_perContextData)
return true;
- ASSERT(!contextBeingInitialized);
- contextBeingInitialized = true;
+ DOMWrapperWorld::setWorldOfInitializingWindow(m_world.get());
bool result = initialize();
- contextBeingInitialized = false;
+ DOMWrapperWorld::setWorldOfInitializingWindow(0);
return result;
}
@@ -501,15 +498,4 @@ void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin)
setSecurityToken(origin);
}
-bool V8WindowShell::contextHasCorrectPrototype(v8::Handle<v8::Context> context)
-{
- if (!isMainThread())
- return true;
- // We're initializing the context, so it is not yet in a status where we can
- // validate the context.
- if (contextBeingInitialized)
- return true;
- return !!toDOMWindow(context);
-}
-
} // WebCore
« no previous file with comments | « Source/bindings/v8/V8WindowShell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698