diff options
Diffstat (limited to 'Source/WebCore/bindings/js/JSDOMWrapper.cpp')
-rw-r--r-- | Source/WebCore/bindings/js/JSDOMWrapper.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Source/WebCore/bindings/js/JSDOMWrapper.cpp b/Source/WebCore/bindings/js/JSDOMWrapper.cpp index 1629ae57e..21da86365 100644 --- a/Source/WebCore/bindings/js/JSDOMWrapper.cpp +++ b/Source/WebCore/bindings/js/JSDOMWrapper.cpp @@ -26,12 +26,32 @@ #include "config.h" #include "JSDOMWrapper.h" +#include "DOMWrapperWorld.h" +#include "JSDOMWindow.h" +#include "WebCoreJSClientData.h" #include <runtime/Error.h> using namespace JSC; namespace WebCore { -STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSDOMWrapper); +STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSDOMObject); + +JSDOMWindow& JSDOMObject::domWindow() const +{ + auto* domWindow = JSC::jsCast<JSDOMWindow*>(JSC::JSNonFinalObject::globalObject()); + ASSERT(domWindow); + return *domWindow; +} + +Subspace* outputConstraintSubspaceFor(VM& vm) +{ + return &static_cast<JSVMClientData*>(vm.clientData)->outputConstraintSpace(); +} + +Subspace* globalObjectOutputConstraintSubspaceFor(VM& vm) +{ + return &static_cast<JSVMClientData*>(vm.clientData)->globalObjectOutputConstraintSpace(); +} } // namespace WebCore |