Index: Source/bindings/v8/V8WindowShell.cpp |
diff --git a/Source/bindings/v8/V8WindowShell.cpp b/Source/bindings/v8/V8WindowShell.cpp |
index acaaf64c8af4ab1b0f3d5472df1faf66f690c1de..62a8c2a5c10b2b9c3cc98a010bf462b06a1a0d44 100644 |
--- a/Source/bindings/v8/V8WindowShell.cpp |
+++ b/Source/bindings/v8/V8WindowShell.cpp |
@@ -67,6 +67,11 @@ namespace WebCore { |
static bool contextBeingInitialized = false; |
+bool V8WindowShell::contextIsBeingInitialized() |
+{ |
+ return contextBeingInitialized; |
+} |
+ |
static void checkDocumentWrapper(v8::Handle<v8::Object> wrapper, Document* document) |
{ |
ASSERT(V8Document::toNative(wrapper) == document); |
@@ -188,8 +193,10 @@ bool V8WindowShell::initializeIfNeeded() |
ASSERT(!contextBeingInitialized); |
contextBeingInitialized = true; |
+ DOMWrapperWorld::setWorldOfInitializingWindow(m_world.get()); |
bool result = initialize(); |
contextBeingInitialized = false; |
+ DOMWrapperWorld::setWorldOfInitializingWindow(0); |
return result; |
} |
@@ -512,15 +519,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 |