summaryrefslogtreecommitdiff
path: root/Source/WebCore/bindings/js/JSDOMWindowBase.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/bindings/js/JSDOMWindowBase.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/bindings/js/JSDOMWindowBase.h')
-rw-r--r--Source/WebCore/bindings/js/JSDOMWindowBase.h45
1 files changed, 26 insertions, 19 deletions
diff --git a/Source/WebCore/bindings/js/JSDOMWindowBase.h b/Source/WebCore/bindings/js/JSDOMWindowBase.h
index fb4c601bc..19c3da4a7 100644
--- a/Source/WebCore/bindings/js/JSDOMWindowBase.h
+++ b/Source/WebCore/bindings/js/JSDOMWindowBase.h
@@ -17,8 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef JSDOMWindowBase_h
-#define JSDOMWindowBase_h
+#pragma once
#include "JSDOMBinding.h"
#include "JSDOMGlobalObject.h"
@@ -34,10 +33,10 @@ namespace WebCore {
class JSDOMWindowBasePrivate;
- class JSDOMWindowBase : public JSDOMGlobalObject {
+ class WEBCORE_EXPORT JSDOMWindowBase : public JSDOMGlobalObject {
typedef JSDOMGlobalObject Base;
protected:
- JSDOMWindowBase(JSC::VM&, JSC::Structure*, PassRefPtr<DOMWindow>, JSDOMWindowShell*);
+ JSDOMWindowBase(JSC::VM&, JSC::Structure*, RefPtr<DOMWindow>&&, JSDOMWindowShell*);
void finishCreation(JSC::VM&, JSDOMWindowShell*);
static void destroy(JSCell*);
@@ -45,7 +44,7 @@ namespace WebCore {
public:
void updateDocument();
- DOMWindow& impl() const { return *m_impl; }
+ DOMWindow& wrapped() const { return *m_wrapped; }
ScriptExecutionContext* scriptExecutionContext() const;
// Called just before removing this window from the JSDOMWindowShell.
@@ -60,38 +59,46 @@ namespace WebCore {
static const JSC::GlobalObjectMethodTable s_globalObjectMethodTable;
- static bool supportsProfiling(const JSC::JSGlobalObject*);
static bool supportsRichSourceInfo(const JSC::JSGlobalObject*);
static bool shouldInterruptScript(const JSC::JSGlobalObject*);
static bool shouldInterruptScriptBeforeTimeout(const JSC::JSGlobalObject*);
- static bool javaScriptExperimentsEnabled(const JSC::JSGlobalObject*);
- static void queueTaskToEventLoop(const JSC::JSGlobalObject*, PassRefPtr<JSC::Microtask>);
+ static JSC::RuntimeFlags javaScriptRuntimeFlags(const JSC::JSGlobalObject*);
+ static void queueTaskToEventLoop(const JSC::JSGlobalObject*, Ref<JSC::Microtask>&&);
void printErrorMessage(const String&) const;
JSDOMWindowShell* shell() const;
- static JSC::VM* commonVM();
-#if PLATFORM(IOS)
- static bool commonVMExists();
- static JSC::VM*& commonVMInternal();
-#endif
+ static void fireFrameClearedWatchpointsForWindow(DOMWindow*);
+ static void visitChildren(JSC::JSCell*, JSC::SlotVisitor&);
+
+ protected:
+ JSC::WatchpointSet m_windowCloseWatchpoints;
private:
- RefPtr<DOMWindow> m_impl;
+ static JSC::JSInternalPromise* moduleLoaderResolve(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue, JSC::JSValue, JSC::JSValue);
+ static JSC::JSInternalPromise* moduleLoaderFetch(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue, JSC::JSValue);
+ static JSC::JSValue moduleLoaderEvaluate(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSValue, JSC::JSValue, JSC::JSValue);
+ static JSC::JSInternalPromise* moduleLoaderImportModule(JSC::JSGlobalObject*, JSC::ExecState*, JSC::JSModuleLoader*, JSC::JSString*, const JSC::SourceOrigin&);
+
+ RefPtr<DOMWindow> m_wrapped;
JSDOMWindowShell* m_shell;
};
// Returns a JSDOMWindow or jsNull()
// JSDOMGlobalObject* is ignored, accessing a window in any context will
// use that DOMWindow's prototype chain.
- JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DOMWindow*);
- JSC::JSValue toJS(JSC::ExecState*, DOMWindow*);
+ WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DOMWindow&);
+ inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMWindow* window) { return window ? toJS(exec, globalObject, *window) : JSC::jsNull(); }
+ JSC::JSValue toJS(JSC::ExecState*, DOMWindow&);
+ inline JSC::JSValue toJS(JSC::ExecState* exec, DOMWindow* window) { return window ? toJS(exec, *window) : JSC::jsNull(); }
// Returns JSDOMWindow or 0
JSDOMWindow* toJSDOMWindow(Frame*, DOMWrapperWorld&);
- JSDOMWindow* toJSDOMWindow(JSC::JSValue);
+ WEBCORE_EXPORT JSDOMWindow* toJSDOMWindow(JSC::VM&, JSC::JSValue);
-} // namespace WebCore
+ DOMWindow& callerDOMWindow(JSC::ExecState*);
+ DOMWindow& activeDOMWindow(JSC::ExecState*);
+ DOMWindow& firstDOMWindow(JSC::ExecState*);
-#endif // JSDOMWindowBase_h
+} // namespace WebCore