return getConstructorForContext(type, context);
}
+#if ENABLE(WORKERS)
v8::Local<v8::Function> V8DOMWrapper::getConstructor(V8ClassIndex::V8WrapperType type, WorkerContext*)
{
WorkerContextExecutionProxy* proxy = WorkerContextExecutionProxy::retrieve();
return getConstructorForContext(type, context);
}
+#endif
void V8DOMWrapper::setHiddenWindowReference(Frame* frame, const int internalIndex, v8::Handle<v8::Object> jsObject)
{
v8::Handle<v8::Object> globalPrototype = v8::Handle<v8::Object>::Cast(context->Global()->GetPrototype());
if (globalObjectPrototypeIsDOMWindow(globalPrototype))
proxy = V8Proxy::retrieve(V8DOMWindow::toNative(globalPrototype)->frame());
+#if ENABLE(WORKERS)
else
workerContext = V8WorkerContext::toNative(globalPrototype);
+#endif
}
}
if (context->isDocument()) {
if (V8Proxy* proxy = V8Proxy::retrieve(context))
return worldContext.adjustedContext(proxy);
+#if ENABLE(WORKERS)
} else if (context->isWorkerContext()) {
if (WorkerContextExecutionProxy* proxy = static_cast<WorkerContext*>(context)->script()->proxy())
return proxy->context();
+#endif
}
return v8::Local<v8::Context>();
}