From 8f72e70a9fd78eec56623b3a62e68f16b7b27e28 Mon Sep 17 00:00:00 2001 From: Feng Qian <> Date: Fri, 10 Apr 2009 18:11:29 -0700 Subject: AI 145796: Land the WebKit merge @r42026. Automated import of CL 145796 --- WebCore/dom/ScriptExecutionContext.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'WebCore/dom/ScriptExecutionContext.h') diff --git a/WebCore/dom/ScriptExecutionContext.h b/WebCore/dom/ScriptExecutionContext.h index 6f09e1a..7b2f36a 100644 --- a/WebCore/dom/ScriptExecutionContext.h +++ b/WebCore/dom/ScriptExecutionContext.h @@ -37,6 +37,7 @@ namespace WebCore { class ActiveDOMObject; + class DOMTimer; class MessagePort; class SecurityOrigin; class ScriptString; @@ -58,12 +59,15 @@ namespace WebCore { const KURL& url() const { return virtualURL(); } KURL completeURL(const String& url) const { return virtualCompleteURL(url); } + virtual String userAgent(const KURL&) const = 0; + SecurityOrigin* securityOrigin() const { return m_securityOrigin.get(); } virtual void reportException(const String& errorMessage, int lineNumber, const String& sourceURL) = 0; virtual void addMessage(MessageDestination, MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL) = 0; virtual void resourceRetrievedByXMLHttpRequest(unsigned long identifier, const ScriptString& sourceString) = 0; - + virtual void scriptImported(unsigned long, const String&) = 0; + // Active objects are not garbage collected even if inaccessible, e.g. because their activity may result in callbacks being invoked. bool canSuspendActiveDOMObjects(); // Active objects can be asked to suspend even if canSuspendActiveDOMObjects() returns 'false' - @@ -94,6 +98,10 @@ namespace WebCore { virtual void postTask(PassRefPtr) = 0; // Executes the task on context's thread asynchronously. + void addTimeout(int timeoutId, DOMTimer*); + void removeTimeout(int timeoutId); + DOMTimer* findTimeout(int timeoutId); + protected: // Explicitly override the security origin for this script context. // Note: It is dangerous to change the security origin of a script context @@ -110,6 +118,8 @@ namespace WebCore { HashMap m_activeDOMObjects; + HashMap m_timeouts; + virtual void refScriptExecutionContext() = 0; virtual void derefScriptExecutionContext() = 0; }; -- cgit v1.1