summaryrefslogtreecommitdiff
path: root/Source/WebCore/bindings/js/JSDOMWindowShell.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/bindings/js/JSDOMWindowShell.h')
-rw-r--r--Source/WebCore/bindings/js/JSDOMWindowShell.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/Source/WebCore/bindings/js/JSDOMWindowShell.h b/Source/WebCore/bindings/js/JSDOMWindowShell.h
index 85a6fd873..17129237b 100644
--- a/Source/WebCore/bindings/js/JSDOMWindowShell.h
+++ b/Source/WebCore/bindings/js/JSDOMWindowShell.h
@@ -10,7 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
@@ -26,15 +26,14 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef JSDOMWindowShell_h
-#define JSDOMWindowShell_h
+#pragma once
+#include "DOMWindow.h"
#include "JSDOMWindow.h"
#include <runtime/JSProxy.h>
namespace WebCore {
- class DOMWindow;
class Frame;
class JSDOMWindowShell : public JSC::JSProxy {
@@ -44,29 +43,30 @@ namespace WebCore {
JSDOMWindow* window() const { return JSC::jsCast<JSDOMWindow*>(target()); }
void setWindow(JSC::VM&, JSDOMWindow*);
- void setWindow(PassRefPtr<DOMWindow>);
+ void setWindow(RefPtr<DOMWindow>&&);
DECLARE_INFO;
- DOMWindow& impl() const;
+ DOMWindow& wrapped() const;
+ static WEBCORE_EXPORT DOMWindow* toWrapped(JSC::VM&, JSC::JSObject*);
- static JSDOMWindowShell* create(JSC::VM& vm, PassRefPtr<DOMWindow> window, JSC::Structure* structure, DOMWrapperWorld& world)
+ static JSDOMWindowShell* create(JSC::VM& vm, RefPtr<DOMWindow>&& window, JSC::Structure* structure, DOMWrapperWorld& world)
{
JSDOMWindowShell* shell = new (NotNull, JSC::allocateCell<JSDOMWindowShell>(vm.heap)) JSDOMWindowShell(vm, structure, world);
- shell->finishCreation(vm, window);
+ shell->finishCreation(vm, WTFMove(window));
return shell;
}
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSValue prototype)
{
- return JSC::Structure::create(vm, 0, prototype, JSC::TypeInfo(JSC::ProxyType, StructureFlags), info());
+ return JSC::Structure::create(vm, 0, prototype, JSC::TypeInfo(JSC::PureForwardingProxyType, StructureFlags), info());
}
- DOMWrapperWorld& world() { return m_world.get(); }
+ DOMWrapperWorld& world() { return m_world; }
protected:
JSDOMWindowShell(JSC::VM&, JSC::Structure*, DOMWrapperWorld&);
- void finishCreation(JSC::VM&, PassRefPtr<DOMWindow>);
+ void finishCreation(JSC::VM&, RefPtr<DOMWindow>&&);
Ref<DOMWrapperWorld> m_world;
};
@@ -75,5 +75,3 @@ namespace WebCore {
JSDOMWindowShell* toJSDOMWindowShell(Frame*, DOMWrapperWorld&);
} // namespace WebCore
-
-#endif // JSDOMWindowShell_h