#include "core/dom/Document.h"
#include "core/frame/Frame.h"
#include "platform/TraceEvent.h"
+#include "wtf/GetPtr.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
}
namespace WebCore {
-const WrapperTypeInfo V8TestInterfaceDocument::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceDocument::domTemplate, V8TestInterfaceDocument::derefObject, 0, V8TestInterfaceDocument::toEventTarget, 0, V8TestInterfaceDocument::installPerContextEnabledMethods, &V8Document::wrapperTypeInfo, WrapperTypeObjectPrototype };
+const WrapperTypeInfo V8TestInterfaceDocument::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceDocument::domTemplate, V8TestInterfaceDocument::derefObject, 0, V8TestInterfaceDocument::toEventTarget, 0, V8TestInterfaceDocument::installPerContextEnabledMethods, &V8Document::wrapperTypeInfo, WrapperTypeObjectPrototype, false };
namespace TestInterfaceDocumentV8Internal {
v8::Handle<v8::Object> wrapper = V8TestInterfaceDocument::createWrapper(impl, creationContext, isolate);
if (wrapper.IsEmpty())
return wrapper;
- if (!isolatedWorldForEnteredContext(isolate)) {
+ DOMWrapperWorld* world = DOMWrapperWorld::current(isolate);
+ if (world->isMainWorld()) {
if (Frame* frame = impl->frame())
- frame->script().windowShell(mainThreadNormalWorld())->updateDocumentWrapper(wrapper);
+ frame->script().windowShell(world)->updateDocumentWrapper(wrapper);
}
return wrapper;
}