Title: [173251] trunk/Source
Revision
173251
Author
b...@cs.washington.edu
Date
2014-09-03 22:53:43 -0700 (Wed, 03 Sep 2014)

Log Message

Web Inspector: fix prefixes for subclasses of JSC::ConsoleClient
https://bugs.webkit.org/show_bug.cgi?id=136476

Reviewed by Timothy Hatcher.

Source/_javascript_Core:

* CMakeLists.txt:
* _javascript_Core.xcodeproj/project.pbxproj:
* inspector/JSGlobalObjectConsoleClient.cpp: Renamed from Source/_javascript_Core/inspector/JSConsoleClient.cpp.
* inspector/JSGlobalObjectConsoleClient.h: Renamed from Source/_javascript_Core/inspector/JSConsoleClient.h.
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
(Inspector::JSGlobalObjectInspectorController::reportAPIException):
* inspector/JSGlobalObjectInspectorController.h:

Source/WebCore:

No new tests. No behavior changed.

* CMakeLists.txt:
* WebCore.exp.in:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::restore):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::clearWindowShell):
(WebCore::ScriptController::initScript):
* css/CSSParser.cpp:
(WebCore::CSSParser::logError):
* dom/Document.cpp:
(WebCore::Document::addConsoleMessage):
(WebCore::Document::addMessage):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::muteConsole):
(WebCore::PageDebuggerAgent::unmuteConsole):
(WebCore::PageDebuggerAgent::breakpointActionLog):
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::muteConsole):
(WebCore::PageRuntimeAgent::unmuteConsole):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::console):
(WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
(WebCore::DOMWindow::close):
(WebCore::DOMWindow::printErrorMessage):
(WebCore::DOMWindow::pageConsole): Deleted.
* page/DOMWindow.h:
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
* page/PageConsoleClient.cpp: Renamed from Source/WebCore/page/PageConsole.cpp.
* page/PageConsoleClient.h: Renamed from Source/WebCore/page/PageConsole.h.
* testing/Internals.cpp:
(WebCore::Internals::consoleProfiles):
* testing/Internals.h:
* xml/XSLStyleSheetLibxslt.cpp:
(WebCore::XSLStyleSheet::parseString):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::XSLTProcessor::parseErrorFunc):
(WebCore::docLoaderFunc):

Source/WebKit/mac:

* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics shouldPrintExceptions]):
(+[WebCoreStatistics setShouldPrintExceptions:]):

Source/WebKit/win:

* WebCoreStatistics.cpp:
(WebCoreStatistics::shouldPrintExceptions):
(WebCoreStatistics::setShouldPrintExceptions):

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/_javascript_Core/CMakeLists.txt (173250 => 173251)


--- trunk/Source/_javascript_Core/CMakeLists.txt	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/_javascript_Core/CMakeLists.txt	2014-09-04 05:53:43 UTC (rev 173251)
@@ -283,9 +283,9 @@
     inspector/InspectorAgentRegistry.cpp
     inspector/InspectorBackendDispatcher.cpp
     inspector/InspectorValues.cpp
-    inspector/JSConsoleClient.cpp
     inspector/JSInjectedScriptHost.cpp
     inspector/JSInjectedScriptHostPrototype.cpp
+    inspector/JSGlobalObjectConsoleClient.cpp
     inspector/JSGlobalObjectInspectorController.cpp
     inspector/JSGlobalObjectScriptDebugServer.cpp
     inspector/JSJavaScriptCallFrame.cpp

Modified: trunk/Source/_javascript_Core/ChangeLog (173250 => 173251)


--- trunk/Source/_javascript_Core/ChangeLog	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-09-04 05:53:43 UTC (rev 173251)
@@ -1,3 +1,19 @@
+2014-09-02  Brian J. Burg  <b...@cs.washington.edu>
+
+        Web Inspector: fix prefixes for subclasses of JSC::ConsoleClient
+        https://bugs.webkit.org/show_bug.cgi?id=136476
+
+        Reviewed by Timothy Hatcher.
+
+        * CMakeLists.txt:
+        * _javascript_Core.xcodeproj/project.pbxproj:
+        * inspector/JSGlobalObjectConsoleClient.cpp: Renamed from Source/_javascript_Core/inspector/JSConsoleClient.cpp.
+        * inspector/JSGlobalObjectConsoleClient.h: Renamed from Source/_javascript_Core/inspector/JSConsoleClient.h.
+        * inspector/JSGlobalObjectInspectorController.cpp:
+        (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
+        (Inspector::JSGlobalObjectInspectorController::reportAPIException):
+        * inspector/JSGlobalObjectInspectorController.h:
+
 2014-09-03  Filip Pizlo  <fpi...@apple.com>
 
         Reenable call edge profiling and polymorphic call inlining, now that a bunch of the bugs

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (173250 => 173251)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2014-09-04 05:53:43 UTC (rev 173251)
@@ -1426,8 +1426,8 @@
 		A5BA15ED182340B400A82E69 /* RemoteInspectorXPCConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = A5BA15E6182340B300A82E69 /* RemoteInspectorXPCConnection.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A5BA15EE182340B400A82E69 /* RemoteInspectorXPCConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5BA15E7182340B300A82E69 /* RemoteInspectorXPCConnection.mm */; };
 		A5BA15F0182345AF00A82E69 /* RemoteInspectorDebuggable.h in Headers */ = {isa = PBXBuildFile; fileRef = A5BA15EF182345AF00A82E69 /* RemoteInspectorDebuggable.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		A5C3A1A518C0490200C9593A /* JSConsoleClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5C3A1A318C0490200C9593A /* JSConsoleClient.cpp */; };
-		A5C3A1A618C0490200C9593A /* JSConsoleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A5C3A1A418C0490200C9593A /* JSConsoleClient.h */; };
+		A5C3A1A518C0490200C9593A /* JSGlobalObjectConsoleClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5C3A1A318C0490200C9593A /* JSGlobalObjectConsoleClient.cpp */; };
+		A5C3A1A618C0490200C9593A /* JSGlobalObjectConsoleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A5C3A1A418C0490200C9593A /* JSGlobalObjectConsoleClient.h */; };
 		A5CEEE14187F3BAD00E55C99 /* InspectorAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5CEEE12187F3BAD00E55C99 /* InspectorAgent.cpp */; };
 		A5D0A1BB1862301B00C7B496 /* InspectorEnvironment.h in Headers */ = {isa = PBXBuildFile; fileRef = A5D0A1BA1862301B00C7B496 /* InspectorEnvironment.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A5D2E665195E174000A518E7 /* JSContextRefInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = A5D2E664195E173800A518E7 /* JSContextRefInternal.h */; };
@@ -3092,8 +3092,8 @@
 		A5BA15E6182340B300A82E69 /* RemoteInspectorXPCConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteInspectorXPCConnection.h; sourceTree = "<group>"; };
 		A5BA15E7182340B300A82E69 /* RemoteInspectorXPCConnection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteInspectorXPCConnection.mm; sourceTree = "<group>"; };
 		A5BA15EF182345AF00A82E69 /* RemoteInspectorDebuggable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteInspectorDebuggable.h; sourceTree = "<group>"; };
-		A5C3A1A318C0490200C9593A /* JSConsoleClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSConsoleClient.cpp; sourceTree = "<group>"; };
-		A5C3A1A418C0490200C9593A /* JSConsoleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSConsoleClient.h; sourceTree = "<group>"; };
+		A5C3A1A318C0490200C9593A /* JSGlobalObjectConsoleClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectConsoleClient.cpp; sourceTree = "<group>"; };
+		A5C3A1A418C0490200C9593A /* JSGlobalObjectConsoleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObjectConsoleClient.h; sourceTree = "<group>"; };
 		A5CEEE12187F3BAD00E55C99 /* InspectorAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorAgent.cpp; sourceTree = "<group>"; };
 		A5CEEE13187F3BAD00E55C99 /* InspectorAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorAgent.h; sourceTree = "<group>"; };
 		A5D0A1BA1862301B00C7B496 /* InspectorEnvironment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorEnvironment.h; sourceTree = "<group>"; };
@@ -5388,8 +5388,8 @@
 				A593CF811840377100BFCE27 /* InspectorValues.h */,
 				A503FA13188E0FAF00110F14 /* _javascript_CallFrame.cpp */,
 				A503FA14188E0FAF00110F14 /* _javascript_CallFrame.h */,
-				A5C3A1A318C0490200C9593A /* JSConsoleClient.cpp */,
-				A5C3A1A418C0490200C9593A /* JSConsoleClient.h */,
+				A5C3A1A318C0490200C9593A /* JSGlobalObjectConsoleClient.cpp */,
+				A5C3A1A418C0490200C9593A /* JSGlobalObjectConsoleClient.h */,
 				A51007BE187CC3C600B38879 /* JSGlobalObjectInspectorController.cpp */,
 				A51007BF187CC3C600B38879 /* JSGlobalObjectInspectorController.h */,
 				A503FA27188F105900110F14 /* JSGlobalObjectScriptDebugServer.cpp */,
@@ -5878,7 +5878,7 @@
 				0FFB921816D02EB20055A5DB /* DFGAllocator.h in Headers */,
 				A737810C1799EA2E00817533 /* DFGAnalysis.h in Headers */,
 				0F1E3A461534CBAF000F9456 /* DFGArgumentPosition.h in Headers */,
-				A5C3A1A618C0490200C9593A /* JSConsoleClient.h in Headers */,
+				A5C3A1A618C0490200C9593A /* JSGlobalObjectConsoleClient.h in Headers */,
 				0F16015E156198C900C2587C /* DFGArgumentsSimplificationPhase.h in Headers */,
 				0F485322187750560083B687 /* DFGArithMode.h in Headers */,
 				0F05C3B41683CF9200BAF45B /* DFGArrayifySlowPathGenerator.h in Headers */,
@@ -7268,7 +7268,7 @@
 				A704D90517A0BAA8006BA554 /* DFGInPlaceAbstractState.cpp in Sources */,
 				0F300B7B18AB1B1400A6D72E /* DFGIntegerCheckCombiningPhase.cpp in Sources */,
 				0FC97F3D18202119002C9B26 /* DFGInvalidationPointInjectionPhase.cpp in Sources */,
-				A5C3A1A518C0490200C9593A /* JSConsoleClient.cpp in Sources */,
+				A5C3A1A518C0490200C9593A /* JSGlobalObjectConsoleClient.cpp in Sources */,
 				0FEA0A33170D40BF00BB722C /* DFGJITCode.cpp in Sources */,
 				86EC9DCB1328DF82002B2AD7 /* DFGJITCompiler.cpp in Sources */,
 				A78A9778179738B8009DF744 /* DFGJITFinalizer.cpp in Sources */,

Deleted: trunk/Source/_javascript_Core/inspector/JSConsoleClient.cpp (173250 => 173251)


--- trunk/Source/_javascript_Core/inspector/JSConsoleClient.cpp	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/_javascript_Core/inspector/JSConsoleClient.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -1,130 +0,0 @@
-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "JSConsoleClient.h"
-
-#if ENABLE(INSPECTOR)
-
-#include "InspectorConsoleAgent.h"
-#include "ScriptArguments.h"
-#include "ScriptCallStack.h"
-#include "ScriptCallStackFactory.h"
-
-#if USE(CF)
-#include <CoreFoundation/CoreFoundation.h>
-#endif
-
-using namespace JSC;
-
-namespace Inspector {
-
-static bool sLogToSystemConsole = false;
-
-bool JSConsoleClient::logToSystemConsole()
-{
-    return sLogToSystemConsole;
-}
-
-void JSConsoleClient::setLogToSystemConsole(bool shouldLog)
-{
-    sLogToSystemConsole = shouldLog;
-}
-
-void JSConsoleClient::initializeLogToSystemConsole()
-{
-#if !LOG_DISABLED
-    sLogToSystemConsole = true;
-#elif USE(CF)
-    Boolean keyExistsAndHasValidFormat = false;
-    Boolean preference = CFPreferencesGetAppBooleanValue(CFSTR("_javascript_CoreOutputConsoleMessagesToSystemConsole"), kCFPreferencesCurrentApplication, &keyExistsAndHasValidFormat);
-    if (keyExistsAndHasValidFormat)
-        sLogToSystemConsole = preference;
-#endif
-}
-
-JSConsoleClient::JSConsoleClient(InspectorConsoleAgent* consoleAgent)
-    : ConsoleClient()
-    , m_consoleAgent(consoleAgent)
-{
-    static std::once_flag initializeLogging;
-    std::call_once(initializeLogging, []{
-        JSConsoleClient::initializeLogToSystemConsole();
-    });
-}
-
-void JSConsoleClient::messageWithTypeAndLevel(MessageType type, MessageLevel level, JSC::ExecState* exec, PassRefPtr<ScriptArguments> prpArguments)
-{
-    RefPtr<ScriptArguments> arguments = prpArguments;
-
-    if (JSConsoleClient::logToSystemConsole())
-        ConsoleClient::printConsoleMessageWithArguments(MessageSource::ConsoleAPI, type, level, exec, arguments);
-
-    String message;
-    arguments->getFirstArgumentAsString(message);
-    m_consoleAgent->addMessageToConsole(MessageSource::ConsoleAPI, type, level, message, exec, arguments.release());
-}
-
-void JSConsoleClient::count(ExecState* exec, PassRefPtr<ScriptArguments> arguments)
-{
-    m_consoleAgent->count(exec, arguments);
-}
-
-void JSConsoleClient::profile(JSC::ExecState*, const String&)
-{
-    // FIXME: support |console.profile| for JSContexts. <https://webkit.org/b/136466>
-}
-
-void JSConsoleClient::profileEnd(JSC::ExecState*, const String&)
-{
-    // FIXME: support |console.profile| for JSContexts. <https://webkit.org/b/136466>
-}
-
-void JSConsoleClient::time(ExecState*, const String& title)
-{
-    m_consoleAgent->startTiming(title);
-}
-
-void JSConsoleClient::timeEnd(ExecState* exec, const String& title)
-{
-    RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(exec, 1));
-    m_consoleAgent->stopTiming(title, callStack.release());
-}
-
-void JSConsoleClient::timeStamp(ExecState*, PassRefPtr<ScriptArguments>)
-{
-    // FIXME: JSContext inspection needs a timeline.
-    warnUnimplemented(ASCIILiteral("console.timeStamp"));
-}
-
-void JSConsoleClient::warnUnimplemented(const String& method)
-{
-    String message = method + " is currently ignored in _javascript_ context inspection.";
-    m_consoleAgent->addMessageToConsole(MessageSource::ConsoleAPI, MessageType::Log, MessageLevel::Warning, message, nullptr, nullptr);
-}
-
-} // namespace Inspector
-
-#endif

Deleted: trunk/Source/_javascript_Core/inspector/JSConsoleClient.h (173250 => 173251)


--- trunk/Source/_javascript_Core/inspector/JSConsoleClient.h	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/_javascript_Core/inspector/JSConsoleClient.h	2014-09-04 05:53:43 UTC (rev 173251)
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef JSConsoleClient_h
-#define JSConsoleClient_h
-
-#include "ConsoleClient.h"
-
-namespace Inspector {
-
-class InspectorConsoleAgent;
-
-class JSConsoleClient final : public JSC::ConsoleClient {
-    WTF_MAKE_FAST_ALLOCATED;
-public:
-    explicit JSConsoleClient(InspectorConsoleAgent*);
-    virtual ~JSConsoleClient() { }
-
-    static bool logToSystemConsole();
-    static void setLogToSystemConsole(bool);
-    static void initializeLogToSystemConsole();
-
-protected:
-    virtual void messageWithTypeAndLevel(MessageType, MessageLevel, JSC::ExecState*, PassRefPtr<ScriptArguments>) override;
-    virtual void count(JSC::ExecState*, PassRefPtr<ScriptArguments>) override;
-    virtual void profile(JSC::ExecState*, const String& title) override;
-    virtual void profileEnd(JSC::ExecState*, const String& title) override;
-    virtual void time(JSC::ExecState*, const String& title) override;
-    virtual void timeEnd(JSC::ExecState*, const String& title) override;
-    virtual void timeStamp(JSC::ExecState*, PassRefPtr<ScriptArguments>) override;
-
-private:
-    void warnUnimplemented(const String& method);
-    void internalAddMessage(MessageType, MessageLevel, JSC::ExecState*, PassRefPtr<ScriptArguments>);
-
-    InspectorConsoleAgent* m_consoleAgent;
-};
-
-}
-
-#endif // !defined(JSConsoleClient_h)

Copied: trunk/Source/_javascript_Core/inspector/JSGlobalObjectConsoleClient.cpp (from rev 173250, trunk/Source/_javascript_Core/inspector/JSConsoleClient.cpp) (0 => 173251)


--- trunk/Source/_javascript_Core/inspector/JSGlobalObjectConsoleClient.cpp	                        (rev 0)
+++ trunk/Source/_javascript_Core/inspector/JSGlobalObjectConsoleClient.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "JSGlobalObjectConsoleClient.h"
+
+#if ENABLE(INSPECTOR)
+
+#include "InspectorConsoleAgent.h"
+#include "ScriptArguments.h"
+#include "ScriptCallStack.h"
+#include "ScriptCallStackFactory.h"
+
+#if USE(CF)
+#include <CoreFoundation/CoreFoundation.h>
+#endif
+
+using namespace JSC;
+
+namespace Inspector {
+
+static bool sLogToSystemConsole = false;
+
+bool JSGlobalObjectConsoleClient::logToSystemConsole()
+{
+    return sLogToSystemConsole;
+}
+
+void JSGlobalObjectConsoleClient::setLogToSystemConsole(bool shouldLog)
+{
+    sLogToSystemConsole = shouldLog;
+}
+
+void JSGlobalObjectConsoleClient::initializeLogToSystemConsole()
+{
+#if !LOG_DISABLED
+    sLogToSystemConsole = true;
+#elif USE(CF)
+    Boolean keyExistsAndHasValidFormat = false;
+    Boolean preference = CFPreferencesGetAppBooleanValue(CFSTR("_javascript_CoreOutputConsoleMessagesToSystemConsole"), kCFPreferencesCurrentApplication, &keyExistsAndHasValidFormat);
+    if (keyExistsAndHasValidFormat)
+        sLogToSystemConsole = preference;
+#endif
+}
+
+JSGlobalObjectConsoleClient::JSGlobalObjectConsoleClient(InspectorConsoleAgent* consoleAgent)
+    : ConsoleClient()
+    , m_consoleAgent(consoleAgent)
+{
+    static std::once_flag initializeLogging;
+    std::call_once(initializeLogging, []{
+        JSGlobalObjectConsoleClient::initializeLogToSystemConsole();
+    });
+}
+
+void JSGlobalObjectConsoleClient::messageWithTypeAndLevel(MessageType type, MessageLevel level, JSC::ExecState* exec, PassRefPtr<ScriptArguments> prpArguments)
+{
+    RefPtr<ScriptArguments> arguments = prpArguments;
+
+    if (JSGlobalObjectConsoleClient::logToSystemConsole())
+        ConsoleClient::printConsoleMessageWithArguments(MessageSource::ConsoleAPI, type, level, exec, arguments);
+
+    String message;
+    arguments->getFirstArgumentAsString(message);
+    m_consoleAgent->addMessageToConsole(MessageSource::ConsoleAPI, type, level, message, exec, arguments.release());
+}
+
+void JSGlobalObjectConsoleClient::count(ExecState* exec, PassRefPtr<ScriptArguments> arguments)
+{
+    m_consoleAgent->count(exec, arguments);
+}
+
+void JSGlobalObjectConsoleClient::profile(JSC::ExecState*, const String&)
+{
+    // FIXME: support |console.profile| for JSContexts. <https://webkit.org/b/136466>
+}
+
+void JSGlobalObjectConsoleClient::profileEnd(JSC::ExecState*, const String&)
+{
+    // FIXME: support |console.profile| for JSContexts. <https://webkit.org/b/136466>
+}
+
+void JSGlobalObjectConsoleClient::time(ExecState*, const String& title)
+{
+    m_consoleAgent->startTiming(title);
+}
+
+void JSGlobalObjectConsoleClient::timeEnd(ExecState* exec, const String& title)
+{
+    RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(exec, 1));
+    m_consoleAgent->stopTiming(title, callStack.release());
+}
+
+void JSGlobalObjectConsoleClient::timeStamp(ExecState*, PassRefPtr<ScriptArguments>)
+{
+    // FIXME: JSContext inspection needs a timeline.
+    warnUnimplemented(ASCIILiteral("console.timeStamp"));
+}
+
+void JSGlobalObjectConsoleClient::warnUnimplemented(const String& method)
+{
+    String message = method + " is currently ignored in _javascript_ context inspection.";
+    m_consoleAgent->addMessageToConsole(MessageSource::ConsoleAPI, MessageType::Log, MessageLevel::Warning, message, nullptr, nullptr);
+}
+
+} // namespace Inspector
+
+#endif

Copied: trunk/Source/_javascript_Core/inspector/JSGlobalObjectConsoleClient.h (from rev 173250, trunk/Source/_javascript_Core/inspector/JSConsoleClient.h) (0 => 173251)


--- trunk/Source/_javascript_Core/inspector/JSGlobalObjectConsoleClient.h	                        (rev 0)
+++ trunk/Source/_javascript_Core/inspector/JSGlobalObjectConsoleClient.h	2014-09-04 05:53:43 UTC (rev 173251)
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef JSGlobalObjectConsoleClient_h
+#define JSGlobalObjectConsoleClient_h
+
+#include "ConsoleClient.h"
+
+namespace Inspector {
+
+class InspectorConsoleAgent;
+
+class JSGlobalObjectConsoleClient final : public JSC::ConsoleClient {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    explicit JSGlobalObjectConsoleClient(InspectorConsoleAgent*);
+    virtual ~JSGlobalObjectConsoleClient() { }
+
+    static bool logToSystemConsole();
+    static void setLogToSystemConsole(bool);
+    static void initializeLogToSystemConsole();
+
+protected:
+    virtual void messageWithTypeAndLevel(MessageType, MessageLevel, JSC::ExecState*, PassRefPtr<ScriptArguments>) override;
+    virtual void count(JSC::ExecState*, PassRefPtr<ScriptArguments>) override;
+    virtual void profile(JSC::ExecState*, const String& title) override;
+    virtual void profileEnd(JSC::ExecState*, const String& title) override;
+    virtual void time(JSC::ExecState*, const String& title) override;
+    virtual void timeEnd(JSC::ExecState*, const String& title) override;
+    virtual void timeStamp(JSC::ExecState*, PassRefPtr<ScriptArguments>) override;
+
+private:
+    void warnUnimplemented(const String& method);
+    void internalAddMessage(MessageType, MessageLevel, JSC::ExecState*, PassRefPtr<ScriptArguments>);
+
+    InspectorConsoleAgent* m_consoleAgent;
+};
+
+}
+
+#endif // !defined(JSGlobalObjectConsoleClient_h)

Modified: trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.cpp (173250 => 173251)


--- trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.cpp	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -35,9 +35,9 @@
 #include "InspectorAgent.h"
 #include "InspectorBackendDispatcher.h"
 #include "InspectorFrontendChannel.h"
-#include "JSConsoleClient.h"
 #include "JSGlobalObject.h"
 #include "JSGlobalObjectConsoleAgent.h"
+#include "JSGlobalObjectConsoleClient.h"
 #include "JSGlobalObjectDebuggerAgent.h"
 #include "JSGlobalObjectRuntimeAgent.h"
 #include "ScriptArguments.h"
@@ -62,7 +62,7 @@
     auto debuggerAgent = std::make_unique<JSGlobalObjectDebuggerAgent>(m_injectedScriptManager.get(), m_globalObject, consoleAgent.get());
 
     m_consoleAgent = consoleAgent.get();
-    m_consoleClient = std::make_unique<JSConsoleClient>(m_consoleAgent);
+    m_consoleClient = std::make_unique<JSGlobalObjectConsoleClient>(m_consoleAgent);
 
     runtimeAgent->setScriptDebugServer(&debuggerAgent->scriptDebugServer());
 
@@ -156,7 +156,7 @@
     String errorMessage = exception.toString(exec)->value(exec);
     exec->clearException();
 
-    if (JSConsoleClient::logToSystemConsole()) {
+    if (JSGlobalObjectConsoleClient::logToSystemConsole()) {
         if (callStack->size()) {
             const ScriptCallFrame& callFrame = callStack->at(0);
             ConsoleClient::printConsoleMessage(MessageSource::JS, MessageType::Log, MessageLevel::Error, errorMessage, callFrame.sourceURL(), callFrame.lineNumber(), callFrame.columnNumber());

Modified: trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.h (173250 => 173251)


--- trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.h	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.h	2014-09-04 05:53:43 UTC (rev 173251)
@@ -48,7 +48,7 @@
 class InspectorBackendDispatcher;
 class InspectorConsoleAgent;
 class InspectorFrontendChannel;
-class JSConsoleClient;
+class JSGlobalObjectConsoleClient;
 class ScriptCallStack;
 
 class JSGlobalObjectInspectorController final : public InspectorEnvironment {
@@ -83,7 +83,7 @@
 
     JSC::JSGlobalObject& m_globalObject;
     std::unique_ptr<InjectedScriptManager> m_injectedScriptManager;
-    std::unique_ptr<JSConsoleClient> m_consoleClient;
+    std::unique_ptr<JSGlobalObjectConsoleClient> m_consoleClient;
     InspectorConsoleAgent* m_consoleAgent;
     InspectorAgentRegistry m_agents;
     InspectorFrontendChannel* m_inspectorFrontendChannel;

Modified: trunk/Source/WebCore/CMakeLists.txt (173250 => 173251)


--- trunk/Source/WebCore/CMakeLists.txt	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/CMakeLists.txt	2014-09-04 05:53:43 UTC (rev 173251)
@@ -1938,7 +1938,7 @@
     page/OriginAccessEntry.cpp
     page/Page.cpp
     page/PageActivityAssertionToken.cpp
-    page/PageConsole.cpp
+    page/PageConsoleClient.cpp
     page/PageGroup.cpp
     page/PageGroupLoadDeferrer.cpp
     page/PageSerializer.cpp

Modified: trunk/Source/WebCore/ChangeLog (173250 => 173251)


--- trunk/Source/WebCore/ChangeLog	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/ChangeLog	2014-09-04 05:53:43 UTC (rev 173251)
@@ -1,3 +1,58 @@
+2014-09-02  Brian J. Burg  <b...@cs.washington.edu>
+
+        Web Inspector: fix prefixes for subclasses of JSC::ConsoleClient
+        https://bugs.webkit.org/show_bug.cgi?id=136476
+
+        Reviewed by Timothy Hatcher.
+
+        No new tests. No behavior changed.
+
+        * CMakeLists.txt:
+        * WebCore.exp.in:
+        * WebCore.order:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSCustomXPathNSResolver.cpp:
+        (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
+        * bindings/js/ScriptCachedFrameData.cpp:
+        (WebCore::ScriptCachedFrameData::restore):
+        * bindings/js/ScriptController.cpp:
+        (WebCore::ScriptController::clearWindowShell):
+        (WebCore::ScriptController::initScript):
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::logError):
+        * dom/Document.cpp:
+        (WebCore::Document::addConsoleMessage):
+        (WebCore::Document::addMessage):
+        * inspector/PageDebuggerAgent.cpp:
+        (WebCore::PageDebuggerAgent::muteConsole):
+        (WebCore::PageDebuggerAgent::unmuteConsole):
+        (WebCore::PageDebuggerAgent::breakpointActionLog):
+        * inspector/PageRuntimeAgent.cpp:
+        (WebCore::PageRuntimeAgent::muteConsole):
+        (WebCore::PageRuntimeAgent::unmuteConsole):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::console):
+        (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
+        (WebCore::DOMWindow::close):
+        (WebCore::DOMWindow::printErrorMessage):
+        (WebCore::DOMWindow::pageConsole): Deleted.
+        * page/DOMWindow.h:
+        * page/Page.cpp:
+        (WebCore::Page::Page):
+        * page/Page.h:
+        * page/PageConsoleClient.cpp: Renamed from Source/WebCore/page/PageConsole.cpp.
+        * page/PageConsoleClient.h: Renamed from Source/WebCore/page/PageConsole.h.
+        * testing/Internals.cpp:
+        (WebCore::Internals::consoleProfiles):
+        * testing/Internals.h:
+        * xml/XSLStyleSheetLibxslt.cpp:
+        (WebCore::XSLStyleSheet::parseString):
+        * xml/XSLTProcessorLibxslt.cpp:
+        (WebCore::XSLTProcessor::parseErrorFunc):
+        (WebCore::docLoaderFunc):
+
 2014-09-03  Maciej Stachowiak  <m...@apple.com>
 
         Fix a few leftovers from removing MIME-related WKSI usage

Modified: trunk/Source/WebCore/WebCore.exp.in (173250 => 173251)


--- trunk/Source/WebCore/WebCore.exp.in	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/WebCore.exp.in	2014-09-04 05:53:43 UTC (rev 173251)
@@ -187,8 +187,6 @@
 __ZN7WebCore11MemoryCache19getOriginsWithCacheERN3WTF7HashSetINS1_6RefPtrINS_14SecurityOriginEEENS_18SecurityOriginHashENS1_10HashTraitsIS5_EEEE
 __ZN7WebCore11MemoryCache20removeImageFromCacheERKNS_3URLERKN3WTF6StringE
 __ZN7WebCore11MemoryCache25removeResourcesWithOriginEPNS_14SecurityOriginE
-__ZN7WebCore11PageConsole21shouldPrintExceptionsEv
-__ZN7WebCore11PageConsole24setShouldPrintExceptionsEb
 __ZN7WebCore11SQLResultOkE
 __ZN7WebCore11URLWithDataEP6NSDataP5NSURL
 __ZN7WebCore11getURLBytesEPK7__CFURLRN3WTF6VectorIcLm512ENS3_15CrashOnOverflowEEE
@@ -763,6 +761,8 @@
 __ZN7WebCore17KeyframeValueList6insertEN3WTF10PassOwnPtrIKNS_14AnimationValueEEE
 __ZN7WebCore17MouseRelatedEvent7offsetXEv
 __ZN7WebCore17MouseRelatedEvent7offsetYEv
+__ZN7WebCore17PageConsoleClient21shouldPrintExceptionsEv
+__ZN7WebCore17PageConsoleClient24setShouldPrintExceptionsEb
 __ZN7WebCore17PlatformCAFilters17setFiltersOnLayerEP7CALayerRKNS_16FilterOperationsE
 __ZN7WebCore17PlatformCAFilters23filterValueForOperationEPKNS_15FilterOperationEi
 __ZN7WebCore17PlatformCAFilters25setBlendingFiltersOnLayerEP7CALayerNS_9BlendModeE
@@ -2047,7 +2047,6 @@
 __ZNK7WebCore9RenderBox12clientHeightEv
 __ZNK7WebCore9RenderBox20flippedClientBoxRectEv
 __ZNK7WebCore9TreeScope14getElementByIdERKN3WTF6StringE
-__ZTVN7WebCore11PageConsoleE
 __ZTVN7WebCore12BlobRegistryE
 __ZTVN7WebCore12ChromeClientE
 __ZTVN7WebCore14LoaderStrategyE
@@ -2058,6 +2057,7 @@
 __ZTVN7WebCore16DatabaseStrategyE
 __ZTVN7WebCore16IconDatabaseBaseE
 __ZTVN7WebCore17FrameLoaderClientE
+__ZTVN7WebCore17PageConsoleClientE
 __ZTVN7WebCore19BlurFilterOperationE
 __ZTVN7WebCore21BlobDataFileReferenceE
 __ZTVN7WebCore22DefaultFilterOperationE

Modified: trunk/Source/WebCore/WebCore.order (173250 => 173251)


--- trunk/Source/WebCore/WebCore.order	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/WebCore.order	2014-09-04 05:53:43 UTC (rev 173251)
@@ -770,7 +770,7 @@
 __ZN7WebCore8Settings32defaultDOMTimerAlignmentIntervalEv
 __ZN7WebCore6RegionC1Ev
 __ZN7WebCore13PageThrottlerC1EPNS_4PageE
-__ZN7WebCore11PageConsoleC1EPNS_4PageE
+__ZN7WebCore17PageConsoleClientC1EPNS_4PageE
 __ZN7WebCore20networkStateNotifierEv
 __ZN7WebCore20NetworkStateNotifierC1Ev
 __ZN7WebCore20NetworkStateNotifierC2Ev
@@ -5268,7 +5268,7 @@
 __ZN7WebCore9CSSParser15currentLocationEv
 __ZN7WebCore9CSSParser11syntaxErrorERKNS0_8LocationENS0_15SyntaxErrorTypeE
 __ZN7WebCore9CSSParser8logErrorERKN3WTF6StringEi
-__ZN7WebCore11PageConsole10addMessageENS_13MessageSourceENS_12MessageLevelERKN3WTF6StringES6_jjNS3_10PassRefPtrINS_15ScriptCallStackEEEPN3JSC9ExecStateEm
+__ZN7WebCore17PageConsoleClient10addMessageENS_13MessageSourceENS_12MessageLevelERKN3WTF6StringES6_jjNS3_10PassRefPtrINS_15ScriptCallStackEEEPN3JSC9ExecStateEm
 __ZN7WebCore21InspectorConsoleAgent19addMessageToConsoleENS_13MessageSourceENS_11MessageTypeENS_12MessageLevelERKN3WTF6StringES7_jjPN3JSC9ExecStateEm
 __ZN7WebCore9CSSParser13parseSVGValueENS_13CSSPropertyIDEb
 __ZN7WebCore9CSSParser29parseDeprecatedLinearGradientEPNS_18CSSParserValueListERN3WTF6RefPtrINS_8CSSValueEEENS_17CSSGradientRepeatE
@@ -6344,9 +6344,9 @@
 __ZN7WebCore18InjectedScriptHost17InspectableObjectD0Ev
 __ZN7WebCore21BackForwardController5closeEv
 __ZN7WebCore13PageThrottler9clearPageEv
-__ZN7WebCore11PageConsoleD0Ev
 __ZN7WebCore13PageThrottlerD1Ev
 __ZN7WebCore13PageThrottlerD2Ev
+__ZN7WebCore17PageConsoleClientD0Ev
 __ZN7WebCore15FeatureObserverD1Ev
 __ZN7WebCore5FrameD1Ev
 __ZN7WebCore5FrameD2Ev
@@ -11726,7 +11726,7 @@
 __ZN7WebCore15ScriptArguments24getFirstArgumentAsStringERN3WTF6StringEb
 __ZNK7WebCore11ScriptValue8toStringEPN3JSC9ExecStateE
 __ZN7WebCore21InspectorConsoleAgent19addMessageToConsoleENS_13MessageSourceENS_11MessageTypeENS_12MessageLevelERKN3WTF6StringEPN3JSC9ExecStateENS4_10PassRefPtrINS_15ScriptArgumentsEEEm
-__ZN7WebCore11PageConsole21shouldPrintExceptionsEv
+__ZN7WebCore17PageConsoleClient21shouldPrintExceptionsEv
 __ZN7WebCore15ScriptArgumentsD1Ev
 __ZN7WebCore15ScriptArgumentsD2Ev
 __ZN7WebCore11ScriptValueD1Ev
@@ -14781,7 +14781,7 @@
 __ZN7WebCore17deviceScaleFactorEPNS_5FrameE
 __ZN7WebCore25printErrorMessageForFrameEPNS_5FrameERKN3WTF6StringE
 __ZN7WebCore9DOMWindow17printErrorMessageERKN3WTF6StringE
-__ZN7WebCore11PageConsole10addMessageENS_13MessageSourceENS_12MessageLevelERKN3WTF6StringEmPNS_8DocumentE
+__ZN7WebCore17PageConsoleClient10addMessageENS_13MessageSourceENS_12MessageLevelERKN3WTF6StringEmPNS_8DocumentE
 __ZN7WebCore14SubframeLoader21resourceWillUsePluginERKN3WTF6StringES4_b
 __ZN7WebCore17HTMLObjectElement21renderFallbackContentEv
 __ZN7WebCore9FrameView20postLayoutTimerFiredEPNS_5TimerIS0_EE
@@ -18731,7 +18731,7 @@
 __ZNK7WebCore9InputType16isMouseFocusableEv
 __ZNK7WebCore16HTMLInputElement31isTextFormControlMouseFocusableEv
 __ZNK7WebCore16HTMLInputElement17canStartSelectionEv
-__ZN7WebCore11PageConsole10addMessageENS_13MessageSourceENS_12MessageLevelERKN3WTF6StringENS3_10PassRefPtrINS_15ScriptCallStackEEE
+__ZN7WebCore17PageConsoleClient10addMessageENS_13MessageSourceENS_12MessageLevelERKN3WTF6StringENS3_10PassRefPtrINS_15ScriptCallStackEEE
 __ZN7WebCoreL17filterConstructorERKNS_13QualifiedNameEPNS_8DocumentEb
 __ZN7WebCore16SVGFilterElement6createERKNS_13QualifiedNameEPNS_8DocumentE
 __ZN7WebCore16SVGFilterElementC2ERKNS_13QualifiedNameEPNS_8DocumentE

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (173250 => 173251)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2014-09-04 05:53:43 UTC (rev 173251)
@@ -7177,7 +7177,7 @@
     <ClCompile Include="..\page\OriginAccessEntry.cpp" />
     <ClCompile Include="..\page\Page.cpp" />
     <ClCompile Include="..\page\PageActivityAssertionToken.cpp" />
-    <ClCompile Include="..\page\PageConsole.cpp" />
+    <ClCompile Include="..\page\PageConsoleClient.cpp" />
     <ClCompile Include="..\page\PageGroup.cpp" />
     <ClCompile Include="..\page\PageGroupLoadDeferrer.cpp" />
     <ClCompile Include="..\page\PageSerializer.cpp" />
@@ -19158,7 +19158,7 @@
     <ClInclude Include="..\page\Navigator.h" />
     <ClInclude Include="..\page\NavigatorBase.h" />
     <ClInclude Include="..\page\OriginAccessEntry.h" />
-    <ClInclude Include="..\page\PageConsole.h" />
+    <ClInclude Include="..\page\PageConsoleClient.h" />
     <ClInclude Include="..\page\PageGroup.h" />
     <ClInclude Include="..\page\PageGroupLoadDeferrer.h" />
     <ClInclude Include="..\page\PageSerializer.h" />

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (173250 => 173251)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2014-09-04 05:53:43 UTC (rev 173251)
@@ -4983,7 +4983,7 @@
     <ClCompile Include="..\page\PageActivityAssertionToken.cpp">
       <Filter>page</Filter>
     </ClCompile>
-    <ClCompile Include="..\page\PageConsole.cpp">
+    <ClCompile Include="..\page\PageConsoleClient.cpp">
       <Filter>page</Filter>
     </ClCompile>
     <ClCompile Include="..\page\PageGroup.cpp">
@@ -12931,7 +12931,7 @@
     <ClInclude Include="..\page\OriginAccessEntry.h">
       <Filter>page</Filter>
     </ClInclude>
-    <ClInclude Include="..\page\PageConsole.h">
+    <ClInclude Include="..\page\PageConsoleClient.h">
       <Filter>page</Filter>
     </ClInclude>
     <ClInclude Include="..\page\PageGroup.h">

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (173250 => 173251)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-09-04 05:53:43 UTC (rev 173251)
@@ -5811,8 +5811,8 @@
 		D7613A501474F13F00DB8606 /* WebKitNamedFlow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D7613A4E1474F13F00DB8606 /* WebKitNamedFlow.cpp */; };
 		D7613AC414753E5600DB8606 /* JSWebKitNamedFlow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D7613AC214753E5600DB8606 /* JSWebKitNamedFlow.cpp */; };
 		D8B6152F1032495100C8554A /* Cookie.h in Headers */ = {isa = PBXBuildFile; fileRef = D8B6152E1032495100C8554A /* Cookie.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		DAED203016F2442B0070EC0F /* PageConsole.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DAACB3D916F2416400666135 /* PageConsole.cpp */; };
-		DAED203116F244480070EC0F /* PageConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = DAACB3DA16F2416400666135 /* PageConsole.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		DAED203016F2442B0070EC0F /* PageConsoleClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DAACB3D916F2416400666135 /* PageConsoleClient.cpp */; };
+		DAED203116F244480070EC0F /* PageConsoleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = DAACB3DA16F2416400666135 /* PageConsoleClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		DB23C2CB0A508D29002489EB /* IndentOutdentCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB23C2C90A508D29002489EB /* IndentOutdentCommand.cpp */; };
 		DB23C2CC0A508D29002489EB /* IndentOutdentCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = DB23C2CA0A508D29002489EB /* IndentOutdentCommand.h */; };
 		DD05FE0D0B8BA3C6009ACDFE /* WebCoreObjCExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = DD05FE0B0B8BA3C6009ACDFE /* WebCoreObjCExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -13277,8 +13277,8 @@
 		D7613AC214753E5600DB8606 /* JSWebKitNamedFlow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitNamedFlow.cpp; sourceTree = "<group>"; };
 		D7613AC314753E5600DB8606 /* JSWebKitNamedFlow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitNamedFlow.h; sourceTree = "<group>"; };
 		D8B6152E1032495100C8554A /* Cookie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cookie.h; sourceTree = "<group>"; };
-		DAACB3D916F2416400666135 /* PageConsole.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageConsole.cpp; sourceTree = "<group>"; };
-		DAACB3DA16F2416400666135 /* PageConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageConsole.h; sourceTree = "<group>"; };
+		DAACB3D916F2416400666135 /* PageConsoleClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageConsoleClient.cpp; sourceTree = "<group>"; };
+		DAACB3DA16F2416400666135 /* PageConsoleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageConsoleClient.h; sourceTree = "<group>"; };
 		DB23C2C90A508D29002489EB /* IndentOutdentCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IndentOutdentCommand.cpp; sourceTree = "<group>"; };
 		DB23C2CA0A508D29002489EB /* IndentOutdentCommand.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IndentOutdentCommand.h; sourceTree = "<group>"; };
 		DBFCB0EBFF5CD77EBEB35395 /* RenderMathMLSpace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderMathMLSpace.cpp; path = rendering/mathml/RenderMathMLSpace.cpp; sourceTree = SOURCE_ROOT; };
@@ -16556,8 +16556,8 @@
 				65A21467097A329100B9050A /* Page.h */,
 				CD08285A1757250800EC5FB7 /* PageActivityAssertionToken.cpp */,
 				CD08285B1757250800EC5FB7 /* PageActivityAssertionToken.h */,
-				DAACB3D916F2416400666135 /* PageConsole.cpp */,
-				DAACB3DA16F2416400666135 /* PageConsole.h */,
+				DAACB3D916F2416400666135 /* PageConsoleClient.cpp */,
+				DAACB3DA16F2416400666135 /* PageConsoleClient.h */,
 				A5A2AF091829734300DE1729 /* PageDebuggable.cpp */,
 				A5A2AF0A1829734300DE1729 /* PageDebuggable.h */,
 				9302B0BC0D79F82900C7EE83 /* PageGroup.cpp */,
@@ -25384,7 +25384,7 @@
 				3774ABA50FA21EB400AD7DE9 /* OverlapTestRequestClient.h in Headers */,
 				65A21468097A329100B9050A /* Page.h in Headers */,
 				1477E7770BF4134A00152872 /* PageCache.h in Headers */,
-				DAED203116F244480070EC0F /* PageConsole.h in Headers */,
+				DAED203116F244480070EC0F /* PageConsoleClient.h in Headers */,
 				F3820893147D35F90010BC06 /* PageConsoleAgent.h in Headers */,
 				A5A2AF0C1829734300DE1729 /* PageDebuggable.h in Headers */,
 				F34742DD134362F000531BC2 /* PageDebuggerAgent.h in Headers */,
@@ -28899,7 +28899,7 @@
 				65FEA86909833ADE00BED4AB /* Page.cpp in Sources */,
 				CD08285C1757250F00EC5FB7 /* PageActivityAssertionToken.cpp in Sources */,
 				1477E7760BF4134A00152872 /* PageCache.cpp in Sources */,
-				DAED203016F2442B0070EC0F /* PageConsole.cpp in Sources */,
+				DAED203016F2442B0070EC0F /* PageConsoleClient.cpp in Sources */,
 				F3820892147D35F90010BC06 /* PageConsoleAgent.cpp in Sources */,
 				A5A2AF0B1829734300DE1729 /* PageDebuggable.cpp in Sources */,
 				F34742DC134362F000531BC2 /* PageDebuggerAgent.cpp in Sources */,

Modified: trunk/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp (173250 => 173251)


--- trunk/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -32,7 +32,7 @@
 #include "JSDOMWindowCustom.h"
 #include "JSMainThreadExecState.h"
 #include "Page.h"
-#include "PageConsole.h"
+#include "PageConsoleClient.h"
 #include "SecurityOrigin.h"
 #include <runtime/JSLock.h>
 #include <wtf/Ref.h>
@@ -80,7 +80,7 @@
         callType = m_customResolver->methodTable()->getCallData(m_customResolver.get(), callData);
         if (callType == CallTypeNone) {
             // FIXME: <http://webkit.org/b/114312> JSCustomXPathNSResolver::lookupNamespaceURI Console Message should include Line, Column, and SourceURL
-            if (PageConsole* console = m_globalObject->impl().pageConsole())
+            if (PageConsoleClient* console = m_globalObject->impl().console())
                 console->addMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("XPathNSResolver does not have a lookupNamespaceURI method."));
             return String();
         }

Modified: trunk/Source/WebCore/bindings/js/ScriptCachedFrameData.cpp (173250 => 173251)


--- trunk/Source/WebCore/bindings/js/ScriptCachedFrameData.cpp	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/bindings/js/ScriptCachedFrameData.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -36,7 +36,7 @@
 #include "Frame.h"
 #include "GCController.h"
 #include "Page.h"
-#include "PageConsole.h"
+#include "PageConsoleClient.h"
 #include "PageGroup.h"
 #include <heap/StrongInlines.h>
 #include <runtime/JSLock.h>

Modified: trunk/Source/WebCore/bindings/js/ScriptController.cpp (173250 => 173251)


--- trunk/Source/WebCore/bindings/js/ScriptController.cpp	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/bindings/js/ScriptController.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -37,7 +37,7 @@
 #include "MainFrame.h"
 #include "NP_jsobject.h"
 #include "Page.h"
-#include "PageConsole.h"
+#include "PageConsoleClient.h"
 #include "PageGroup.h"
 #include "PluginView.h"
 #include "ScriptSourceCode.h"

Modified: trunk/Source/WebCore/css/CSSParser.cpp (173250 => 173251)


--- trunk/Source/WebCore/css/CSSParser.cpp	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/css/CSSParser.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -65,7 +65,7 @@
 #include "MediaList.h"
 #include "MediaQueryExp.h"
 #include "Page.h"
-#include "PageConsole.h"
+#include "PageConsoleClient.h"
 #include "Pair.h"
 #include "Rect.h"
 #include "RenderTheme.h"
@@ -11689,7 +11689,7 @@
 void CSSParser::logError(const String& message, int lineNumber)
 {
     // FIXME: <http://webkit.org/b/114313> CSS parser console message errors should include column numbers.
-    PageConsole& console = m_styleSheet->singleOwnerDocument()->page()->console();
+    PageConsoleClient& console = m_styleSheet->singleOwnerDocument()->page()->console();
     console.addMessage(MessageSource::CSS, MessageLevel::Warning, message, m_styleSheet->baseURL().string(), lineNumber + 1, 0);
 }
 

Modified: trunk/Source/WebCore/dom/Document.cpp (173250 => 173251)


--- trunk/Source/WebCore/dom/Document.cpp	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/dom/Document.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -105,7 +105,7 @@
 #include "NodeIterator.h"
 #include "NodeRareData.h"
 #include "NodeWithIndex.h"
-#include "PageConsole.h"
+#include "PageConsoleClient.h"
 #include "PageGroup.h"
 #include "PageTransitionEvent.h"
 #include "PlatformLocale.h"

Modified: trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp (173250 => 173251)


--- trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -38,7 +38,7 @@
 #include "InspectorPageAgent.h"
 #include "InstrumentingAgents.h"
 #include "Page.h"
-#include "PageConsole.h"
+#include "PageConsoleClient.h"
 #include "PageScriptDebugServer.h"
 #include "ScriptState.h"
 #include <inspector/InjectedScript.h>
@@ -108,12 +108,12 @@
 
 void PageDebuggerAgent::muteConsole()
 {
-    PageConsole::mute();
+    PageConsoleClient::mute();
 }
 
 void PageDebuggerAgent::unmuteConsole()
 {
-    PageConsole::unmute();
+    PageConsoleClient::unmute();
 }
 
 void PageDebuggerAgent::breakpointActionLog(JSC::ExecState* exec, const String& message)

Modified: trunk/Source/WebCore/inspector/PageRuntimeAgent.cpp (173250 => 173251)


--- trunk/Source/WebCore/inspector/PageRuntimeAgent.cpp	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/inspector/PageRuntimeAgent.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -40,7 +40,7 @@
 #include "JSDOMWindowBase.h"
 #include "MainFrame.h"
 #include "Page.h"
-#include "PageConsole.h"
+#include "PageConsoleClient.h"
 #include "ScriptController.h"
 #include "ScriptState.h"
 #include "SecurityOrigin.h"
@@ -146,12 +146,12 @@
 
 void PageRuntimeAgent::muteConsole()
 {
-    PageConsole::mute();
+    PageConsoleClient::mute();
 }
 
 void PageRuntimeAgent::unmuteConsole()
 {
-    PageConsole::unmute();
+    PageConsoleClient::unmute();
 }
 
 void PageRuntimeAgent::reportExecutionContextCreation()

Modified: trunk/Source/WebCore/page/DOMWindow.cpp (173250 => 173251)


--- trunk/Source/WebCore/page/DOMWindow.cpp	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/page/DOMWindow.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -76,7 +76,7 @@
 #include "MessageEvent.h"
 #include "Navigator.h"
 #include "Page.h"
-#include "PageConsole.h"
+#include "PageConsoleClient.h"
 #include "PageGroup.h"
 #include "PageTransitionEvent.h"
 #include "Performance.h"
@@ -702,11 +702,11 @@
     return m_toolbar.get();
 }
 
-PageConsole* DOMWindow::pageConsole() const
+PageConsoleClient* DOMWindow::console() const
 {
     if (!isCurrentlyDisplayedInFrame())
-        return 0;
-    return m_frame->page() ? &m_frame->page()->console() : 0;
+        return nullptr;
+    return m_frame->page() ? &m_frame->page()->console() : nullptr;
 }
 
 DOMApplicationCache* DOMWindow::applicationCache() const
@@ -937,7 +937,7 @@
         if (!intendedTargetOrigin->isSameSchemeHostPort(document()->securityOrigin())) {
             String message = "Unable to post message to " + intendedTargetOrigin->toString() +
                              ". Recipient has origin " + document()->securityOrigin()->toString() + ".\n";
-            pageConsole()->addMessage(MessageSource::Security, MessageLevel::Error, message, stackTrace);
+            console()->addMessage(MessageSource::Security, MessageLevel::Error, message, stackTrace);
             return;
         }
     }
@@ -1036,7 +1036,7 @@
     bool allowScriptsToCloseWindows = m_frame->settings().allowScriptsToCloseWindows();
 
     if (!(page->openedByDOM() || page->backForward().count() <= 1 || allowScriptsToCloseWindows)) {
-        pageConsole()->addMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Can't close the window since it was not opened by _javascript_"));
+        console()->addMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Can't close the window since it was not opened by _javascript_"));
         return;
     }
 
@@ -2008,8 +2008,8 @@
     if (message.isEmpty())
         return;
 
-    if (PageConsole* console = pageConsole())
-        console->addMessage(MessageSource::JS, MessageLevel::Error, message);
+    if (PageConsoleClient* pageConsole = console())
+        pageConsole->addMessage(MessageSource::JS, MessageLevel::Error, message);
 }
 
 String DOMWindow::crossDomainAccessErrorMessage(const DOMWindow& activeWindow)

Modified: trunk/Source/WebCore/page/DOMWindow.h (173250 => 173251)


--- trunk/Source/WebCore/page/DOMWindow.h	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/page/DOMWindow.h	2014-09-04 05:53:43 UTC (rev 173251)
@@ -67,7 +67,7 @@
     class Navigator;
     class Node;
     class Page;
-    class PageConsole;
+    class PageConsoleClient;
     class Performance;
     class PostMessageTimer;
     class ScheduledAction;
@@ -235,7 +235,7 @@
         PassRefPtr<WebKitPoint> webkitConvertPointFromPageToNode(Node*, const WebKitPoint*) const;
         PassRefPtr<WebKitPoint> webkitConvertPointFromNodeToPage(Node*, const WebKitPoint*) const;
 
-        PageConsole* pageConsole() const;
+        PageConsoleClient* console() const;
 
         void printErrorMessage(const String&);
         String crossDomainAccessErrorMessage(const DOMWindow& activeWindow);

Modified: trunk/Source/WebCore/page/Page.cpp (173250 => 173251)


--- trunk/Source/WebCore/page/Page.cpp	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/page/Page.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -57,7 +57,7 @@
 #include "NetworkStateNotifier.h"
 #include "PageActivityAssertionToken.h"
 #include "PageCache.h"
-#include "PageConsole.h"
+#include "PageConsoleClient.h"
 #include "PageDebuggable.h"
 #include "PageGroup.h"
 #include "PageThrottler.h"
@@ -192,7 +192,7 @@
 #endif
     , m_alternativeTextClient(pageClients.alternativeTextClient)
     , m_scriptedAnimationsSuspended(false)
-    , m_console(std::make_unique<PageConsole>(*this))
+    , m_consoleClient(std::make_unique<PageConsoleClient>(*this))
 #if ENABLE(REMOTE_INSPECTOR)
     , m_inspectorDebuggable(std::make_unique<PageDebuggable>(*this))
 #endif

Modified: trunk/Source/WebCore/page/Page.h (173250 => 173251)


--- trunk/Source/WebCore/page/Page.h	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/page/Page.h	2014-09-04 05:53:43 UTC (rev 173251)
@@ -81,7 +81,7 @@
 class MainFrame;
 class MediaCanStartListener;
 class PageActivityAssertionToken;
-class PageConsole;
+class PageConsoleClient;
 class PageDebuggable;
 class PageGroup;
 class PageThrottler;
@@ -408,7 +408,7 @@
     PageThrottler* pageThrottler() { return m_pageThrottler.get(); }
     WEBCORE_EXPORT void createPageThrottler();
 
-    PageConsole& console() { return *m_console; }
+    PageConsoleClient& console() { return *m_consoleClient; }
 
     void hiddenPageCSSAnimationSuspensionStateChanged();
 
@@ -571,7 +571,7 @@
 
     bool m_scriptedAnimationsSuspended;
     std::unique_ptr<PageThrottler> m_pageThrottler;
-    const std::unique_ptr<PageConsole> m_console;
+    const std::unique_ptr<PageConsoleClient> m_consoleClient;
 
 #if ENABLE(REMOTE_INSPECTOR)
     const std::unique_ptr<PageDebuggable> m_inspectorDebuggable;

Deleted: trunk/Source/WebCore/page/PageConsole.cpp (173250 => 173251)


--- trunk/Source/WebCore/page/PageConsole.cpp	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/page/PageConsole.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -1,198 +0,0 @@
-/*
- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 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 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "PageConsole.h"
-
-#include "Chrome.h"
-#include "ChromeClient.h"
-#include "Document.h"
-#include "Frame.h"
-#include "InspectorConsoleInstrumentation.h"
-#include "InspectorController.h"
-#include "JSMainThreadExecState.h"
-#include "MainFrame.h"
-#include "Page.h"
-#include "ScriptableDocumentParser.h"
-#include "Settings.h"
-#include <bindings/ScriptValue.h>
-#include <inspector/ScriptArguments.h>
-#include <inspector/ScriptCallStack.h>
-#include <inspector/ScriptCallStackFactory.h>
-
-using namespace Inspector;
-
-namespace WebCore {
-
-PageConsole::PageConsole(Page& page)
-    : m_page(page)
-{
-}
-
-PageConsole::~PageConsole()
-{
-}
-
-static int muteCount = 0;
-static bool printExceptions = false;
-
-bool PageConsole::shouldPrintExceptions()
-{
-    return printExceptions;
-}
-
-void PageConsole::setShouldPrintExceptions(bool print)
-{
-    printExceptions = print;
-}
-
-void PageConsole::mute()
-{
-    muteCount++;
-}
-
-void PageConsole::unmute()
-{
-    ASSERT(muteCount > 0);
-    muteCount--;
-}
-
-void PageConsole::addMessage(MessageSource source, MessageLevel level, const String& message, unsigned long requestIdentifier, Document* document)
-{
-    String url;
-    if (document)
-        url = ""
-
-    // FIXME: The below code attempts to determine line numbers for parser generated errors, but this is not the only reason why we can get here.
-    // For example, if we are still parsing and get a WebSocket network error, it will be erroneously attributed to a line where parsing was paused.
-    // Also, we should determine line numbers for script generated messages (e.g. calling getImageData on a canvas).
-    // We probably need to split this function into multiple ones, as appropriate for different call sites. Or maybe decide based on MessageSource.
-    // https://bugs.webkit.org/show_bug.cgi?id=125340
-    unsigned line = 0;
-    unsigned column = 0;
-    if (document && document->parsing() && !document->isInDocumentWrite() && document->scriptableDocumentParser()) {
-        ScriptableDocumentParser* parser = document->scriptableDocumentParser();
-        if (!parser->isWaitingForScripts() && !JSMainThreadExecState::currentState()) {
-            TextPosition position = parser->textPosition();
-            line = position.m_line.oneBasedInt();
-            column = position.m_column.oneBasedInt();
-        }
-    }
-    addMessage(source, level, message, url, line, column, 0, JSMainThreadExecState::currentState(), requestIdentifier);
-}
-
-void PageConsole::addMessage(MessageSource source, MessageLevel level, const String& message, PassRefPtr<ScriptCallStack> callStack)
-{
-    addMessage(source, level, message, String(), 0, 0, callStack, 0);
-}
-
-void PageConsole::addMessage(MessageSource source, MessageLevel level, const String& message, const String& url, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, JSC::ExecState* state, unsigned long requestIdentifier)
-{
-    if (muteCount && source != MessageSource::ConsoleAPI)
-        return;
-
-    if (callStack)
-        InspectorInstrumentation::addMessageToConsole(&m_page, source, MessageType::Log, level, message, callStack, requestIdentifier);
-    else
-        InspectorInstrumentation::addMessageToConsole(&m_page, source, MessageType::Log, level, message, url, lineNumber, columnNumber, state, requestIdentifier);
-
-    if (source == MessageSource::CSS)
-        return;
-
-    if (m_page.usesEphemeralSession())
-        return;
-
-    m_page.chrome().client().addMessageToConsole(source, level, message, lineNumber, columnNumber, url);
-
-    if (!m_page.settings().logsPageMessagesToSystemConsoleEnabled() && !shouldPrintExceptions())
-        return;
-
-    ConsoleClient::printConsoleMessage(MessageSource::ConsoleAPI, MessageType::Log, level, message, url, lineNumber, columnNumber);
-}
-
-
-void PageConsole::messageWithTypeAndLevel(MessageType type, MessageLevel level, JSC::ExecState* exec, PassRefPtr<Inspector::ScriptArguments> prpArguments)
-{
-    RefPtr<ScriptArguments> arguments = prpArguments;
-
-    String message;
-    bool gotMessage = arguments->getFirstArgumentAsString(message);
-    InspectorInstrumentation::addMessageToConsole(&m_page, MessageSource::ConsoleAPI, type, level, message, exec, arguments);
-
-    if (m_page.usesEphemeralSession())
-        return;
-
-    if (gotMessage) {
-        size_t stackSize = type == MessageType::Trace ? ScriptCallStack::maxCallStackSizeToCapture : 1;
-        RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(exec, stackSize));
-        const ScriptCallFrame& lastCaller = callStack->at(0);
-        m_page.chrome().client().addMessageToConsole(MessageSource::ConsoleAPI, type, level, message, lastCaller.lineNumber(), lastCaller.columnNumber(), lastCaller.sourceURL());
-    }
-
-    if (m_page.settings().logsPageMessagesToSystemConsoleEnabled() || PageConsole::shouldPrintExceptions())
-        ConsoleClient::printConsoleMessageWithArguments(MessageSource::ConsoleAPI, type, level, exec, arguments.release());
-}
-
-void PageConsole::count(JSC::ExecState* exec, PassRefPtr<ScriptArguments> arguments)
-{
-    InspectorInstrumentation::consoleCount(&m_page, exec, arguments);
-}
-
-void PageConsole::profile(JSC::ExecState* exec, const String& title)
-{
-    InspectorInstrumentation::startProfiling(&m_page, exec, title);
-}
-
-void PageConsole::profileEnd(JSC::ExecState* exec, const String& title)
-{
-    if (RefPtr<JSC::Profile> profile = "" exec, title))
-        m_profiles.append(profile.release());
-}
-
-void PageConsole::time(JSC::ExecState*, const String& title)
-{
-    InspectorInstrumentation::startConsoleTiming(&m_page.mainFrame(), title);
-}
-
-void PageConsole::timeEnd(JSC::ExecState* exec, const String& title)
-{
-    RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(exec, 1));
-    InspectorInstrumentation::stopConsoleTiming(&m_page.mainFrame(), title, callStack.release());
-}
-
-void PageConsole::timeStamp(JSC::ExecState*, PassRefPtr<ScriptArguments> arguments)
-{
-    InspectorInstrumentation::consoleTimeStamp(&m_page.mainFrame(), arguments);
-}
-
-void PageConsole::clearProfiles()
-{
-    m_profiles.clear();
-}
-
-} // namespace WebCore

Deleted: trunk/Source/WebCore/page/PageConsole.h (173250 => 173251)


--- trunk/Source/WebCore/page/PageConsole.h	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/page/PageConsole.h	2014-09-04 05:53:43 UTC (rev 173251)
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 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 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef PageConsole_h
-#define PageConsole_h
-
-#include <inspector/ScriptCallStack.h>
-#include <runtime/ConsoleClient.h>
-#include <wtf/Forward.h>
-
-namespace JSC {
-class ExecState;
-class Profile;
-}
-
-namespace WebCore {
-
-class Document;
-class Page;
-
-typedef Vector<RefPtr<JSC::Profile>> ProfilesArray;
-
-class PageConsole final : public JSC::ConsoleClient {
-public:
-    explicit PageConsole(Page&);
-    virtual ~PageConsole();
-
-    WEBCORE_EXPORT static bool shouldPrintExceptions();
-    WEBCORE_EXPORT static void setShouldPrintExceptions(bool);
-
-    static void mute();
-    static void unmute();
-
-    void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<Inspector::ScriptCallStack> = nullptr, JSC::ExecState* = nullptr, unsigned long requestIdentifier = 0);
-    void addMessage(MessageSource, MessageLevel, const String& message, PassRefPtr<Inspector::ScriptCallStack>);
-    void addMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0, Document* = nullptr);
-
-    const ProfilesArray& profiles() const { return m_profiles; }
-    void clearProfiles();
-
-protected:
-    virtual void messageWithTypeAndLevel(MessageType, MessageLevel, JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>) override;
-    virtual void count(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>) override;
-    virtual void profile(JSC::ExecState*, const String& title) override;
-    virtual void profileEnd(JSC::ExecState*, const String& title) override;
-    virtual void time(JSC::ExecState*, const String& title) override;
-    virtual void timeEnd(JSC::ExecState*, const String& title) override;
-    virtual void timeStamp(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>) override;
-
-private:
-    Page& m_page;
-    ProfilesArray m_profiles;
-};
-
-} // namespace WebCore
-
-#endif // PageConsole_h

Copied: trunk/Source/WebCore/page/PageConsoleClient.cpp (from rev 173250, trunk/Source/WebCore/page/PageConsole.cpp) (0 => 173251)


--- trunk/Source/WebCore/page/PageConsoleClient.cpp	                        (rev 0)
+++ trunk/Source/WebCore/page/PageConsoleClient.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -0,0 +1,198 @@
+/*
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 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 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PageConsoleClient.h"
+
+#include "Chrome.h"
+#include "ChromeClient.h"
+#include "Document.h"
+#include "Frame.h"
+#include "InspectorConsoleInstrumentation.h"
+#include "InspectorController.h"
+#include "JSMainThreadExecState.h"
+#include "MainFrame.h"
+#include "Page.h"
+#include "ScriptableDocumentParser.h"
+#include "Settings.h"
+#include <bindings/ScriptValue.h>
+#include <inspector/ScriptArguments.h>
+#include <inspector/ScriptCallStack.h>
+#include <inspector/ScriptCallStackFactory.h>
+
+using namespace Inspector;
+
+namespace WebCore {
+
+PageConsoleClient::PageConsoleClient(Page& page)
+    : m_page(page)
+{
+}
+
+PageConsoleClient::~PageConsoleClient()
+{
+}
+
+static int muteCount = 0;
+static bool printExceptions = false;
+
+bool PageConsoleClient::shouldPrintExceptions()
+{
+    return printExceptions;
+}
+
+void PageConsoleClient::setShouldPrintExceptions(bool print)
+{
+    printExceptions = print;
+}
+
+void PageConsoleClient::mute()
+{
+    muteCount++;
+}
+
+void PageConsoleClient::unmute()
+{
+    ASSERT(muteCount > 0);
+    muteCount--;
+}
+
+void PageConsoleClient::addMessage(MessageSource source, MessageLevel level, const String& message, unsigned long requestIdentifier, Document* document)
+{
+    String url;
+    if (document)
+        url = ""
+
+    // FIXME: The below code attempts to determine line numbers for parser generated errors, but this is not the only reason why we can get here.
+    // For example, if we are still parsing and get a WebSocket network error, it will be erroneously attributed to a line where parsing was paused.
+    // Also, we should determine line numbers for script generated messages (e.g. calling getImageData on a canvas).
+    // We probably need to split this function into multiple ones, as appropriate for different call sites. Or maybe decide based on MessageSource.
+    // https://bugs.webkit.org/show_bug.cgi?id=125340
+    unsigned line = 0;
+    unsigned column = 0;
+    if (document && document->parsing() && !document->isInDocumentWrite() && document->scriptableDocumentParser()) {
+        ScriptableDocumentParser* parser = document->scriptableDocumentParser();
+        if (!parser->isWaitingForScripts() && !JSMainThreadExecState::currentState()) {
+            TextPosition position = parser->textPosition();
+            line = position.m_line.oneBasedInt();
+            column = position.m_column.oneBasedInt();
+        }
+    }
+    addMessage(source, level, message, url, line, column, 0, JSMainThreadExecState::currentState(), requestIdentifier);
+}
+
+void PageConsoleClient::addMessage(MessageSource source, MessageLevel level, const String& message, PassRefPtr<ScriptCallStack> callStack)
+{
+    addMessage(source, level, message, String(), 0, 0, callStack, 0);
+}
+
+void PageConsoleClient::addMessage(MessageSource source, MessageLevel level, const String& message, const String& url, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, JSC::ExecState* state, unsigned long requestIdentifier)
+{
+    if (muteCount && source != MessageSource::ConsoleAPI)
+        return;
+
+    if (callStack)
+        InspectorInstrumentation::addMessageToConsole(&m_page, source, MessageType::Log, level, message, callStack, requestIdentifier);
+    else
+        InspectorInstrumentation::addMessageToConsole(&m_page, source, MessageType::Log, level, message, url, lineNumber, columnNumber, state, requestIdentifier);
+
+    if (source == MessageSource::CSS)
+        return;
+
+    if (m_page.usesEphemeralSession())
+        return;
+
+    m_page.chrome().client().addMessageToConsole(source, level, message, lineNumber, columnNumber, url);
+
+    if (!m_page.settings().logsPageMessagesToSystemConsoleEnabled() && !shouldPrintExceptions())
+        return;
+
+    ConsoleClient::printConsoleMessage(MessageSource::ConsoleAPI, MessageType::Log, level, message, url, lineNumber, columnNumber);
+}
+
+
+void PageConsoleClient::messageWithTypeAndLevel(MessageType type, MessageLevel level, JSC::ExecState* exec, PassRefPtr<Inspector::ScriptArguments> prpArguments)
+{
+    RefPtr<ScriptArguments> arguments = prpArguments;
+
+    String message;
+    bool gotMessage = arguments->getFirstArgumentAsString(message);
+    InspectorInstrumentation::addMessageToConsole(&m_page, MessageSource::ConsoleAPI, type, level, message, exec, arguments);
+
+    if (m_page.usesEphemeralSession())
+        return;
+
+    if (gotMessage) {
+        size_t stackSize = type == MessageType::Trace ? ScriptCallStack::maxCallStackSizeToCapture : 1;
+        RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(exec, stackSize));
+        const ScriptCallFrame& lastCaller = callStack->at(0);
+        m_page.chrome().client().addMessageToConsole(MessageSource::ConsoleAPI, type, level, message, lastCaller.lineNumber(), lastCaller.columnNumber(), lastCaller.sourceURL());
+    }
+
+    if (m_page.settings().logsPageMessagesToSystemConsoleEnabled() || PageConsoleClient::shouldPrintExceptions())
+        ConsoleClient::printConsoleMessageWithArguments(MessageSource::ConsoleAPI, type, level, exec, arguments.release());
+}
+
+void PageConsoleClient::count(JSC::ExecState* exec, PassRefPtr<ScriptArguments> arguments)
+{
+    InspectorInstrumentation::consoleCount(&m_page, exec, arguments);
+}
+
+void PageConsoleClient::profile(JSC::ExecState* exec, const String& title)
+{
+    InspectorInstrumentation::startProfiling(&m_page, exec, title);
+}
+
+void PageConsoleClient::profileEnd(JSC::ExecState* exec, const String& title)
+{
+    if (RefPtr<JSC::Profile> profile = "" exec, title))
+        m_profiles.append(profile.release());
+}
+
+void PageConsoleClient::time(JSC::ExecState*, const String& title)
+{
+    InspectorInstrumentation::startConsoleTiming(&m_page.mainFrame(), title);
+}
+
+void PageConsoleClient::timeEnd(JSC::ExecState* exec, const String& title)
+{
+    RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(exec, 1));
+    InspectorInstrumentation::stopConsoleTiming(&m_page.mainFrame(), title, callStack.release());
+}
+
+void PageConsoleClient::timeStamp(JSC::ExecState*, PassRefPtr<ScriptArguments> arguments)
+{
+    InspectorInstrumentation::consoleTimeStamp(&m_page.mainFrame(), arguments);
+}
+
+void PageConsoleClient::clearProfiles()
+{
+    m_profiles.clear();
+}
+
+} // namespace WebCore

Copied: trunk/Source/WebCore/page/PageConsoleClient.h (from rev 173250, trunk/Source/WebCore/page/PageConsole.h) (0 => 173251)


--- trunk/Source/WebCore/page/PageConsoleClient.h	                        (rev 0)
+++ trunk/Source/WebCore/page/PageConsoleClient.h	2014-09-04 05:53:43 UTC (rev 173251)
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 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 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PageConsoleClient_h
+#define PageConsoleClient_h
+
+#include <inspector/ScriptCallStack.h>
+#include <runtime/ConsoleClient.h>
+#include <wtf/Forward.h>
+
+namespace JSC {
+class ExecState;
+class Profile;
+}
+
+namespace WebCore {
+
+class Document;
+class Page;
+
+typedef Vector<RefPtr<JSC::Profile>> ProfilesArray;
+
+class PageConsoleClient final : public JSC::ConsoleClient {
+public:
+    explicit PageConsoleClient(Page&);
+    virtual ~PageConsoleClient();
+
+    WEBCORE_EXPORT static bool shouldPrintExceptions();
+    WEBCORE_EXPORT static void setShouldPrintExceptions(bool);
+
+    static void mute();
+    static void unmute();
+
+    void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<Inspector::ScriptCallStack> = nullptr, JSC::ExecState* = nullptr, unsigned long requestIdentifier = 0);
+    void addMessage(MessageSource, MessageLevel, const String& message, PassRefPtr<Inspector::ScriptCallStack>);
+    void addMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0, Document* = nullptr);
+
+    const ProfilesArray& profiles() const { return m_profiles; }
+    void clearProfiles();
+
+protected:
+    virtual void messageWithTypeAndLevel(MessageType, MessageLevel, JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>) override;
+    virtual void count(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>) override;
+    virtual void profile(JSC::ExecState*, const String& title) override;
+    virtual void profileEnd(JSC::ExecState*, const String& title) override;
+    virtual void time(JSC::ExecState*, const String& title) override;
+    virtual void timeEnd(JSC::ExecState*, const String& title) override;
+    virtual void timeStamp(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>) override;
+
+private:
+    Page& m_page;
+    ProfilesArray m_profiles;
+};
+
+} // namespace WebCore
+
+#endif // PageConsoleClient_h

Modified: trunk/Source/WebCore/testing/Internals.h (173250 => 173251)


--- trunk/Source/WebCore/testing/Internals.h	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/testing/Internals.h	2014-09-04 05:53:43 UTC (rev 173251)
@@ -31,7 +31,7 @@
 #include "ContextDestructionObserver.h"
 #include "ExceptionCodePlaceholder.h"
 #include "NodeList.h"
-#include "PageConsole.h"
+#include "PageConsoleClient.h"
 #include <bindings/ScriptValue.h>
 #include <runtime/ArrayBuffer.h>
 #include <runtime/Float32Array.h>

Modified: trunk/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp (173250 => 173251)


--- trunk/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -27,7 +27,7 @@
 #include "Document.h"
 #include "Frame.h"
 #include "Page.h"
-#include "PageConsole.h"
+#include "PageConsoleClient.h"
 #include "TransformSource.h"
 #include "XMLDocumentParser.h"
 #include "XMLDocumentParserScope.h"
@@ -140,7 +140,7 @@
         xmlFreeDoc(m_stylesheetDoc);
     m_stylesheetDocTaken = false;
 
-    PageConsole* console = 0;
+    PageConsoleClient* console = nullptr;
     Frame* frame = ownerDocument()->frame();
     if (frame && frame->page())
         console = &frame->page()->console();

Modified: trunk/Source/WebCore/xml/XSLTProcessorLibxslt.cpp (173250 => 173251)


--- trunk/Source/WebCore/xml/XSLTProcessorLibxslt.cpp	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebCore/xml/XSLTProcessorLibxslt.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -30,7 +30,7 @@
 #include "Document.h"
 #include "Frame.h"
 #include "Page.h"
-#include "PageConsole.h"
+#include "PageConsoleClient.h"
 #include "ResourceError.h"
 #include "ResourceRequest.h"
 #include "ResourceResponse.h"
@@ -79,7 +79,7 @@
 
 void XSLTProcessor::parseErrorFunc(void* userData, xmlError* error)
 {
-    PageConsole* console = static_cast<PageConsole*>(userData);
+    PageConsoleClient* console = static_cast<PageConsoleClient*>(userData);
     if (!console)
         return;
 
@@ -138,7 +138,7 @@
             globalCachedResourceLoader->printAccessDeniedMessage(url);
         }
 
-        PageConsole* console = 0;
+        PageConsoleClient* console = nullptr;
         Frame* frame = globalProcessor->xslStylesheet()->ownerDocument()->frame();
         if (frame && frame->page())
             console = &frame->page()->console();

Modified: trunk/Source/WebKit/mac/ChangeLog (173250 => 173251)


--- trunk/Source/WebKit/mac/ChangeLog	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebKit/mac/ChangeLog	2014-09-04 05:53:43 UTC (rev 173251)
@@ -1,3 +1,14 @@
+2014-09-02  Brian J. Burg  <b...@cs.washington.edu>
+
+        Web Inspector: fix prefixes for subclasses of JSC::ConsoleClient
+        https://bugs.webkit.org/show_bug.cgi?id=136476
+
+        Reviewed by Timothy Hatcher.
+
+        * Misc/WebCoreStatistics.mm:
+        (+[WebCoreStatistics shouldPrintExceptions]):
+        (+[WebCoreStatistics setShouldPrintExceptions:]):
+
 2014-09-03  Enrica Casucci  <enr...@apple.com>
 
         Remove PLATFORM(IOS) from WebCore/editing (Part 1).

Modified: trunk/Source/WebKit/mac/Misc/WebCoreStatistics.mm (173250 => 173251)


--- trunk/Source/WebKit/mac/Misc/WebCoreStatistics.mm	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebKit/mac/Misc/WebCoreStatistics.mm	2014-09-04 05:53:43 UTC (rev 173251)
@@ -41,7 +41,7 @@
 #import <WebCore/IconDatabase.h>
 #import <WebCore/JSDOMWindow.h>
 #import <WebCore/PageCache.h>
-#import <WebCore/PageConsole.h>
+#import <WebCore/PageConsoleClient.h>
 #import <WebCore/PrintContext.h>
 #import <WebCore/RenderTreeAsText.h>
 #import <WebCore/RenderView.h>
@@ -168,13 +168,13 @@
 + (BOOL)shouldPrintExceptions
 {
     JSLockHolder lock(JSDOMWindow::commonVM());
-    return PageConsole::shouldPrintExceptions();
+    return PageConsoleClient::shouldPrintExceptions();
 }
 
 + (void)setShouldPrintExceptions:(BOOL)print
 {
     JSLockHolder lock(JSDOMWindow::commonVM());
-    PageConsole::setShouldPrintExceptions(print);
+    PageConsoleClient::setShouldPrintExceptions(print);
 }
 
 + (void)emptyCache

Modified: trunk/Source/WebKit/win/ChangeLog (173250 => 173251)


--- trunk/Source/WebKit/win/ChangeLog	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebKit/win/ChangeLog	2014-09-04 05:53:43 UTC (rev 173251)
@@ -1,3 +1,14 @@
+2014-09-02  Brian J. Burg  <b...@cs.washington.edu>
+
+        Web Inspector: fix prefixes for subclasses of JSC::ConsoleClient
+        https://bugs.webkit.org/show_bug.cgi?id=136476
+
+        Reviewed by Timothy Hatcher.
+
+        * WebCoreStatistics.cpp:
+        (WebCoreStatistics::shouldPrintExceptions):
+        (WebCoreStatistics::setShouldPrintExceptions):
+
 2014-09-02  Maciej Stachowiak  <m...@apple.com>
 
         Clean up naming for and slightly refactor legacy video fullscreen support

Modified: trunk/Source/WebKit/win/WebCoreStatistics.cpp (173250 => 173251)


--- trunk/Source/WebKit/win/WebCoreStatistics.cpp	2014-09-04 04:29:30 UTC (rev 173250)
+++ trunk/Source/WebKit/win/WebCoreStatistics.cpp	2014-09-04 05:53:43 UTC (rev 173251)
@@ -36,7 +36,7 @@
 #include <WebCore/IconDatabase.h>
 #include <WebCore/JSDOMWindow.h>
 #include <WebCore/PageCache.h>
-#include <WebCore/PageConsole.h>
+#include <WebCore/PageConsoleClient.h>
 #include <WebCore/RenderView.h>
 #include <WebCore/SharedBuffer.h>
 
@@ -268,14 +268,14 @@
         return E_POINTER;
 
     JSLockHolder lock(JSDOMWindow::commonVM());
-    *shouldPrint = PageConsole::shouldPrintExceptions();
+    *shouldPrint = PageConsoleClient::shouldPrintExceptions();
     return S_OK;
 }
 
 HRESULT WebCoreStatistics::setShouldPrintExceptions(BOOL print)
 {
     JSLockHolder lock(JSDOMWindow::commonVM());
-    PageConsole::setShouldPrintExceptions(print);
+    PageConsoleClient::setShouldPrintExceptions(print);
     return S_OK;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to