summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/ScriptExecutionContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/ScriptExecutionContext.h')
-rw-r--r--Source/WebCore/dom/ScriptExecutionContext.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/WebCore/dom/ScriptExecutionContext.h b/Source/WebCore/dom/ScriptExecutionContext.h
index 24a17f599..aed3411e0 100644
--- a/Source/WebCore/dom/ScriptExecutionContext.h
+++ b/Source/WebCore/dom/ScriptExecutionContext.h
@@ -30,6 +30,7 @@
#include "ActiveDOMObject.h"
#include "ConsoleTypes.h"
#include "KURL.h"
+#include "ScriptCallStack.h"
#include "SecurityContext.h"
#include <wtf/Forward.h>
#include <wtf/HashMap.h>
@@ -51,7 +52,6 @@ class EventListener;
class EventQueue;
class EventTarget;
class MessagePort;
-class ScriptCallStack;
#if ENABLE(SQL_DATABASE)
class Database;
@@ -80,7 +80,7 @@ public:
// When the database cleanup is done, cleanupSync will be signalled.
void stopDatabases(DatabaseTaskSynchronizer*);
#endif
- virtual bool isContextThread() const = 0;
+ virtual bool isContextThread() const { return true; }
virtual bool isJSExecutionForbidden() const = 0;
const KURL& url() const { return virtualURL(); }
@@ -92,8 +92,8 @@ public:
bool sanitizeScriptError(String& errorMessage, int& lineNumber, String& sourceURL);
void reportException(const String& errorMessage, int lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>);
- virtual void addMessage(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>) = 0;
- void addConsoleMessage(MessageSource, MessageType, MessageLevel, const String& message);
+ void addConsoleMessage(MessageSource, MessageType, MessageLevel, const String& message, const String& sourceURL = String(), unsigned lineNumber = 0, PassRefPtr<ScriptCallStack> = 0);
+ void addConsoleMessage(MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>);
// Active objects are not garbage collected even if inaccessible, e.g. because their activity may result in callbacks being invoked.
bool canSuspendActiveDOMObjects();
@@ -183,8 +183,9 @@ private:
virtual const KURL& virtualURL() const = 0;
virtual KURL virtualCompleteURL(const String&) const = 0;
+ virtual void addMessage(MessageSource, MessageType, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>) = 0;
virtual EventTarget* errorEventTarget() = 0;
- virtual void logExceptionToConsole(const String& errorMessage, int lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>) = 0;
+ virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) = 0;
bool dispatchErrorEvent(const String& errorMessage, int lineNumber, const String& sourceURL);
void closeMessagePorts();