Web Inspector: Add Console support to JSContext Inspection
https://bugs.webkit.org/show_bug.cgi?id=127941
Reviewed by Geoffrey Garen.
Source/JavaScriptCore:
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
Add new files.
* inspector/agents/InspectorConsoleAgent.cpp: Renamed from Source/WebCore/inspector/InspectorConsoleAgent.cpp.
* inspector/agents/InspectorConsoleAgent.h: Added.
New agent moved from WebCore. Rename a method to work in JS only context.
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
Instantiate ConsoleAgent.
* inspector/agents/JSGlobalObjectConsoleAgent.h: Copied from Source/WebCore/inspector/PageInjectedScriptHost.h.
* inspector/agents/JSGlobalObjectConsoleAgent.cpp: Copied from Source/WebCore/inspector/PageInjectedScriptHost.h.
(Inspector::JSGlobalObjectConsoleAgent::JSGlobalObjectConsoleAgent):
(Inspector::JSGlobalObjectConsoleAgent::setMonitoringXHREnabled):
(Inspector::JSGlobalObjectConsoleAgent::addInspectedNode):
(Inspector::JSGlobalObjectConsoleAgent::addInspectedHeapObject):
JSGlobalObject implementation.
* inspector/agents/JSGlobalObjectDebuggerAgent.h:
* inspector/agents/JSGlobalObjectDebuggerAgent.cpp:
(Inspector::JSGlobalObjectDebuggerAgent::JSGlobalObjectDebuggerAgent):
(Inspector::JSGlobalObjectDebuggerAgent::breakpointActionLog):
Use ConsoleAgent to report logs.
* inspector/ConsoleMessage.cpp: Renamed from Source/WebCore/inspector/ConsoleMessage.cpp.
* inspector/ConsoleMessage.h: Renamed from Source/WebCore/inspector/ConsoleMessage.h.
* inspector/ConsoleTypes.h: Copied from Source/WebCore/inspector/ConsoleAPITypes.h.
* inspector/IdentifiersFactory.cpp: Renamed from Source/WebCore/inspector/IdentifiersFactory.cpp.
* inspector/IdentifiersFactory.h: Renamed from Source/WebCore/inspector/IdentifiersFactory.h.
* inspector/ScriptArguments.cpp: Renamed from Source/WebCore/inspector/ScriptArguments.cpp.
* inspector/ScriptArguments.h: Renamed from Source/WebCore/inspector/ScriptArguments.h.
* inspector/ScriptCallFrame.cpp: Renamed from Source/WebCore/inspector/ScriptCallFrame.cpp.
* inspector/ScriptCallFrame.h: Renamed from Source/WebCore/inspector/ScriptCallFrame.h.
* inspector/ScriptCallStack.cpp: Renamed from Source/WebCore/inspector/ScriptCallStack.cpp.
* inspector/ScriptCallStack.h: Renamed from Source/WebCore/inspector/ScriptCallStack.h.
* inspector/ScriptCallStackFactory.cpp: Renamed from Source/WebCore/bindings/js/ScriptCallStackFactory.cpp.
* inspector/ScriptCallStackFactory.h: Renamed from Source/WebCore/bindings/js/ScriptCallStackFactory.h.
* inspector/protocol/Console.json: Renamed from Source/WebCore/inspector/protocol/Console.json.
* inspector/scripts/generate-combined-inspector-json.py:
Source/WebCore:
- Move InspectorConsoleAgent and dependencies to JavaScriptCore
and into the Inspector namespace.
- Update Console Message enum types to enum classes and update
all users to the new, simpler names.
- Since we are updating addConsoleMessage callsites anyways, add
ASCIILiteral where appropriate.
- Add WebConsoleAgent base of Page/Worker ConsoleAgent to implement
what could not be pushed into JavaScriptCore.
* CMakeLists.txt:
* DerivedSources.make:
* ForwardingHeaders/inspector/ConsoleMessage.h: Added.
* ForwardingHeaders/inspector/ConsoleTypes.h: Added.
* ForwardingHeaders/inspector/IdentifiersFactory.h: Added.
* ForwardingHeaders/inspector/ScriptArguments.h: Added.
* ForwardingHeaders/inspector/ScriptCallFrame.h: Added.
* ForwardingHeaders/inspector/ScriptCallStack.h: Added.
* ForwardingHeaders/inspector/ScriptCallStackFactory.h: Added.
* ForwardingHeaders/inspector/agents/InspectorConsoleAgent.h: Added.
* GNUmakefile.am:
* GNUmakefile.list.am:
Add / remove files from builds.
* inspector/WebConsoleAgent.h:
* inspector/WebConsoleAgent.cpp: Added.
(WebCore::WebConsoleAgent::WebConsoleAgent):
(WebCore::WebConsoleAgent::setMonitoringXHREnabled):
(WebCore::WebConsoleAgent::frameWindowDiscarded):
(WebCore::WebConsoleAgent::didFinishXHRLoading):
(WebCore::WebConsoleAgent::didReceiveResponse):
(WebCore::WebConsoleAgent::didFailLoading):
(WebCore::WebConsoleAgent::addInspectedHeapObject):
Implement what could not be pushed down into JavaScriptCore.
* inspector/InstrumentingAgents.h:
(WebCore::InstrumentingAgents::webConsoleAgent):
(WebCore::InstrumentingAgents::setWebConsoleAgent):
Hold a WebConsoleAgent instead of InspectorConsoleAgent.
* Modules/indexeddb/IDBCursor.cpp:
* Modules/indexeddb/IDBDatabase.cpp:
* Modules/indexeddb/IDBTransaction.cpp:
* Modules/quota/DOMWindowQuota.cpp:
(WebCore::DOMWindowQuota::webkitStorageInfo):
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::looping):
(WebCore::AudioBufferSourceNode::setLooping):
* Modules/webaudio/AudioContext.cpp:
* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::setPanningModel):
* Modules/webdatabase/DatabaseBase.cpp:
(WebCore::DatabaseBase::logErrorMessage):
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::logErrorMessage):
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect):
(WebCore::WebSocket::send):
(WebCore::WebSocket::close):
(WebCore::WebSocket::setBinaryType):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::fail):
(WebCore::WebSocketChannel::didFailSocketStream):
* Modules/websockets/WebSocketHandshake.cpp:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSAudioContextCustom.cpp:
(WebCore::JSAudioContextConstructor::constructJSAudioContext):
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* bindings/js/JSDOMBinding.cpp:
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::JSSubtleCrypto::encrypt):
(WebCore::JSSubtleCrypto::decrypt):
(WebCore::JSSubtleCrypto::sign):
(WebCore::JSSubtleCrypto::verify):
(WebCore::JSSubtleCrypto::wrapKey):
(WebCore::JSSubtleCrypto::unwrapKey):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::canExecuteScripts):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallWith):
* bindings/scripts/test/JS/JSTestObj.cpp:
* css/CSSParser.cpp:
(WebCore::CSSParser::logError):
* css/MediaList.cpp:
(WebCore::addResolutionWarningMessageToConsole):
* dom/Document.cpp:
(WebCore::Document::logExceptionToConsole):
(WebCore::Document::processHttpEquiv):
(WebCore::Document::addMessage):
* dom/Document.h:
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::executeScript):
(WebCore::ScriptElement::notifyFinished):
* dom/ScriptExecutionContext.cpp:
* dom/ScriptExecutionContext.h:
* dom/ViewportArguments.cpp:
(WebCore::viewportErrorMessageLevel):
(WebCore::reportViewportWarning):
* fileapi/Blob.cpp:
* fileapi/WebKitBlobBuilder.cpp:
* html/HTMLFormControlElement.cpp:
(WebCore::shouldAutofocus):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::validateInteractively):
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::parseAttribute):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::getImageData):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::printWarningToConsole):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::init):
* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSAuditorDelegate::didBlockScript):
* inspector/CommandLineAPIHost.cpp:
* inspector/CommandLineAPIHost.h:
(WebCore::CommandLineAPIHost::init):
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorConsoleAgent.h: Removed.
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
(WebCore::InspectorInstrumentation::consoleCount):
(WebCore::InspectorInstrumentation::stopConsoleTiming):
(WebCore::InspectorInstrumentation::consoleTimeStamp):
(WebCore::InspectorInstrumentation::addProfile):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorDOMAgent.cpp:
* inspector/InspectorFrontendHost.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::frameWindowDiscardedImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didFailLoadingImpl):
(WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
(WebCore::isConsoleAssertMessage):
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::consoleCountImpl):
(WebCore::InspectorInstrumentation::startConsoleTimingImpl):
(WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
(WebCore::InspectorInstrumentation::consoleAgentEnabled):
* inspector/InspectorInstrumentation.h:
* inspector/InspectorLayerTreeAgent.cpp:
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
(WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::buildInitiatorObject):
* inspector/InspectorTimelineAgent.cpp:
* inspector/InstrumentingAgents.cpp:
(WebCore::InstrumentingAgents::InstrumentingAgents):
(WebCore::InstrumentingAgents::reset):
* inspector/PageConsoleAgent.cpp:
(WebCore::PageConsoleAgent::PageConsoleAgent):
(WebCore::PageConsoleAgent::clearMessages):
(WebCore::PageConsoleAgent::addInspectedNode):
* inspector/PageConsoleAgent.h:
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::breakpointActionLog):
* inspector/PageInjectedScriptHost.h:
* inspector/PageInjectedScriptManager.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericRecord):
(WebCore::WebConsoleAgent::~WebConsoleAgent):
* inspector/WorkerConsoleAgent.cpp:
(WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
(WebCore::WorkerConsoleAgent::addInspectedNode):
* inspector/WorkerConsoleAgent.h:
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::breakpointActionLog):
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::reportLocalLoadFailed):
(WebCore::FrameLoader::handleBeforeUnloadEvent):
(WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
(WebCore::createWindow):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::notifyFinished):
* loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::logWarning):
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::corsPolicyPreventedLoad):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::abort):
(WebCore::ApplicationCacheGroup::didReceiveResponse):
(WebCore::ApplicationCacheGroup::didFinishLoading):
(WebCore::ApplicationCacheGroup::didFail):
(WebCore::ApplicationCacheGroup::didReceiveManifestResponse):
(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
(WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::printAccessDeniedMessage):
* page/ChromeClient.h:
* page/Console.cpp:
(WebCore::internalAddMessage):
(WebCore::Console::debug):
(WebCore::Console::error):
(WebCore::Console::log):
(WebCore::Console::warn):
(WebCore::Console::dir):
(WebCore::Console::dirxml):
(WebCore::Console::table):
(WebCore::Console::clear):
(WebCore::Console::trace):
(WebCore::Console::assertCondition):
(WebCore::Console::group):
(WebCore::Console::groupCollapsed):
(WebCore::Console::groupEnd):
* page/Console.h:
* page/ConsoleTypes.h: Removed.
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation):
(WebCore::ContentSecurityPolicy::logToConsole):
* page/DOMSecurityPolicy.cpp:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessage):
(WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
(WebCore::DOMWindow::close):
(WebCore::DOMWindow::printErrorMessage):
* page/DOMWindow.h:
* page/EventSource.cpp:
(WebCore::EventSource::didReceiveResponse):
(WebCore::EventSource::didFailAccessControlCheck):
* page/PageConsole.cpp:
(WebCore::PageConsole::printMessageSourceAndLevelPrefix):
(WebCore::PageConsole::addMessage):
* page/PageConsole.h:
* page/PointerLockController.cpp:
(WebCore::PointerLockController::requestPointerLock):
* platform/CrossThreadCopier.h:
* rendering/shapes/ShapeInfo.cpp:
(WebCore::checkShapeImageOrigin):
* svg/SVGDocumentExtensions.cpp:
(WebCore::reportMessage):
(WebCore::SVGDocumentExtensions::reportWarning):
(WebCore::SVGDocumentExtensions::reportError):
* testing/Internals.cpp:
(WebCore::Internals::consoleMessageArgumentCounts):
* workers/DefaultSharedWorkerRepository.cpp:
* workers/SharedWorkerGlobalScope.cpp:
(WebCore::SharedWorkerGlobalScope::logExceptionToConsole):
* workers/SharedWorkerGlobalScope.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
* workers/WorkerGlobalScope.h:
* workers/WorkerMessagingProxy.cpp:
* workers/WorkerReportingProxy.h:
* xml/XMLHttpRequest.cpp:
(WebCore::logConsoleError):
(WebCore::XMLHttpRequest::send):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::XSLTProcessor::parseErrorFunc):
Source/WebInspectorUI:
* UserInterface/InspectorJSBackendCommands.js:
* UserInterface/InspectorWebBackendCommands.js:
ConsoleAgent moved to JavaScript section.
Source/WebKit/gtk:
* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::addMessageToConsole):
Source/WebKit/mac:
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(stringForMessageSource):
(stringForMessageLevel):
(WebChromeClient::addMessageToConsole):
Source/WebKit/win:
* WebCoreSupport/WebChromeClient.h:
Source/WebKit/wince:
* WebCoreSupport/ChromeClientWinCE.h:
Source/WebKit2:
* WebProcess/WebCoreSupport/WebChromeClient.h:
LayoutTests:
* inspector-protocol/page/deny-X-FrameOption-expected.txt:
Update with better line/column numbers now.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt
index 051a4ea..845840c 100644
--- a/Source/WebCore/CMakeLists.txt
+++ b/Source/WebCore/CMakeLists.txt
@@ -760,7 +760,6 @@
inspector/protocol/ApplicationCache.json
inspector/protocol/CSS.json
inspector/protocol/Canvas.json
- inspector/protocol/Console.json
inspector/protocol/DOM.json
inspector/protocol/DOMDebugger.json
inspector/protocol/DOMStorage.json
@@ -1566,16 +1565,13 @@
inspector/CommandLineAPIHost.cpp
inspector/CommandLineAPIModule.cpp
- inspector/ConsoleMessage.cpp
inspector/DOMEditor.cpp
inspector/DOMPatchSupport.cpp
- inspector/IdentifiersFactory.cpp
inspector/InjectedScriptCanvasModule.cpp
inspector/InspectorApplicationCacheAgent.cpp
inspector/InspectorCSSAgent.cpp
inspector/InspectorCanvasAgent.cpp
inspector/InspectorClient.cpp
- inspector/InspectorConsoleAgent.cpp
inspector/InspectorController.cpp
inspector/InspectorCounters.cpp
inspector/InspectorDOMAgent.cpp
@@ -1609,10 +1605,8 @@
inspector/PageInjectedScriptHost.cpp
inspector/PageInjectedScriptManager.cpp
inspector/PageRuntimeAgent.cpp
- inspector/ScriptArguments.cpp
- inspector/ScriptCallFrame.cpp
- inspector/ScriptCallStack.cpp
inspector/TimelineRecordFactory.cpp
+ inspector/WebConsoleAgent.cpp
inspector/WebDebuggerAgent.cpp
inspector/WorkerConsoleAgent.cpp
inspector/WorkerDebuggerAgent.cpp
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index d315f17..2d308a6 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,5 +1,276 @@
2014-02-06 Joseph Pecoraro <pecoraro@apple.com>
+ Web Inspector: Add Console support to JSContext Inspection
+ https://bugs.webkit.org/show_bug.cgi?id=127941
+
+ Reviewed by Geoffrey Garen.
+
+ - Move InspectorConsoleAgent and dependencies to JavaScriptCore
+ and into the Inspector namespace.
+ - Update Console Message enum types to enum classes and update
+ all users to the new, simpler names.
+ - Since we are updating addConsoleMessage callsites anyways, add
+ ASCIILiteral where appropriate.
+ - Add WebConsoleAgent base of Page/Worker ConsoleAgent to implement
+ what could not be pushed into JavaScriptCore.
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * ForwardingHeaders/inspector/ConsoleMessage.h: Added.
+ * ForwardingHeaders/inspector/ConsoleTypes.h: Added.
+ * ForwardingHeaders/inspector/IdentifiersFactory.h: Added.
+ * ForwardingHeaders/inspector/ScriptArguments.h: Added.
+ * ForwardingHeaders/inspector/ScriptCallFrame.h: Added.
+ * ForwardingHeaders/inspector/ScriptCallStack.h: Added.
+ * ForwardingHeaders/inspector/ScriptCallStackFactory.h: Added.
+ * ForwardingHeaders/inspector/agents/InspectorConsoleAgent.h: Added.
+ * GNUmakefile.am:
+ * GNUmakefile.list.am:
+ Add / remove files from builds.
+
+ * inspector/WebConsoleAgent.h:
+ * inspector/WebConsoleAgent.cpp: Added.
+ (WebCore::WebConsoleAgent::WebConsoleAgent):
+ (WebCore::WebConsoleAgent::setMonitoringXHREnabled):
+ (WebCore::WebConsoleAgent::frameWindowDiscarded):
+ (WebCore::WebConsoleAgent::didFinishXHRLoading):
+ (WebCore::WebConsoleAgent::didReceiveResponse):
+ (WebCore::WebConsoleAgent::didFailLoading):
+ (WebCore::WebConsoleAgent::addInspectedHeapObject):
+ Implement what could not be pushed down into JavaScriptCore.
+
+ * inspector/InstrumentingAgents.h:
+ (WebCore::InstrumentingAgents::webConsoleAgent):
+ (WebCore::InstrumentingAgents::setWebConsoleAgent):
+ Hold a WebConsoleAgent instead of InspectorConsoleAgent.
+
+ * Modules/indexeddb/IDBCursor.cpp:
+ * Modules/indexeddb/IDBDatabase.cpp:
+ * Modules/indexeddb/IDBTransaction.cpp:
+ * Modules/quota/DOMWindowQuota.cpp:
+ (WebCore::DOMWindowQuota::webkitStorageInfo):
+ * Modules/webaudio/AudioBufferSourceNode.cpp:
+ (WebCore::AudioBufferSourceNode::looping):
+ (WebCore::AudioBufferSourceNode::setLooping):
+ * Modules/webaudio/AudioContext.cpp:
+ * Modules/webaudio/PannerNode.cpp:
+ (WebCore::PannerNode::setPanningModel):
+ * Modules/webdatabase/DatabaseBase.cpp:
+ (WebCore::DatabaseBase::logErrorMessage):
+ * Modules/webdatabase/DatabaseManager.cpp:
+ (WebCore::DatabaseManager::logErrorMessage):
+ * Modules/websockets/WebSocket.cpp:
+ (WebCore::WebSocket::connect):
+ (WebCore::WebSocket::send):
+ (WebCore::WebSocket::close):
+ (WebCore::WebSocket::setBinaryType):
+ * Modules/websockets/WebSocketChannel.cpp:
+ (WebCore::WebSocketChannel::fail):
+ (WebCore::WebSocketChannel::didFailSocketStream):
+ * Modules/websockets/WebSocketHandshake.cpp:
+ * WebCore.exp.in:
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSAudioContextCustom.cpp:
+ (WebCore::JSAudioContextConstructor::constructJSAudioContext):
+ * bindings/js/JSCustomXPathNSResolver.cpp:
+ (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/js/JSDOMBinding.cpp:
+ * bindings/js/JSSubtleCryptoCustom.cpp:
+ (WebCore::JSSubtleCrypto::encrypt):
+ (WebCore::JSSubtleCrypto::decrypt):
+ (WebCore::JSSubtleCrypto::sign):
+ (WebCore::JSSubtleCrypto::verify):
+ (WebCore::JSSubtleCrypto::wrapKey):
+ (WebCore::JSSubtleCrypto::unwrapKey):
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::canExecuteScripts):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateCallWith):
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::logError):
+ * css/MediaList.cpp:
+ (WebCore::addResolutionWarningMessageToConsole):
+ * dom/Document.cpp:
+ (WebCore::Document::logExceptionToConsole):
+ (WebCore::Document::processHttpEquiv):
+ (WebCore::Document::addMessage):
+ * dom/Document.h:
+ * dom/ScriptElement.cpp:
+ (WebCore::ScriptElement::executeScript):
+ (WebCore::ScriptElement::notifyFinished):
+ * dom/ScriptExecutionContext.cpp:
+ * dom/ScriptExecutionContext.h:
+ * dom/ViewportArguments.cpp:
+ (WebCore::viewportErrorMessageLevel):
+ (WebCore::reportViewportWarning):
+ * fileapi/Blob.cpp:
+ * fileapi/WebKitBlobBuilder.cpp:
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::shouldAutofocus):
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::validateInteractively):
+ * html/HTMLIFrameElement.cpp:
+ (WebCore::HTMLIFrameElement::parseAttribute):
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::parseAttribute):
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::getImageData):
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::printWarningToConsole):
+ * html/parser/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::init):
+ * html/parser/XSSAuditorDelegate.cpp:
+ (WebCore::XSSAuditorDelegate::didBlockScript):
+ * inspector/CommandLineAPIHost.cpp:
+ * inspector/CommandLineAPIHost.h:
+ (WebCore::CommandLineAPIHost::init):
+ * inspector/InspectorAllInOne.cpp:
+ * inspector/InspectorConsoleAgent.h: Removed.
+ * inspector/InspectorConsoleInstrumentation.h:
+ (WebCore::InspectorInstrumentation::addMessageToConsole):
+ (WebCore::InspectorInstrumentation::consoleCount):
+ (WebCore::InspectorInstrumentation::stopConsoleTiming):
+ (WebCore::InspectorInstrumentation::consoleTimeStamp):
+ (WebCore::InspectorInstrumentation::addProfile):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ * inspector/InspectorDOMAgent.cpp:
+ * inspector/InspectorFrontendHost.h:
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore::InspectorInstrumentation::frameWindowDiscardedImpl):
+ (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
+ (WebCore::InspectorInstrumentation::didFailLoadingImpl):
+ (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
+ (WebCore::InspectorInstrumentation::didCommitLoadImpl):
+ (WebCore::isConsoleAssertMessage):
+ (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
+ (WebCore::InspectorInstrumentation::consoleCountImpl):
+ (WebCore::InspectorInstrumentation::startConsoleTimingImpl):
+ (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
+ (WebCore::InspectorInstrumentation::consoleAgentEnabled):
+ * inspector/InspectorInstrumentation.h:
+ * inspector/InspectorLayerTreeAgent.cpp:
+ * inspector/InspectorPageAgent.cpp:
+ * inspector/InspectorProfilerAgent.cpp:
+ (WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
+ (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
+ * inspector/InspectorProfilerAgent.h:
+ * inspector/InspectorResourceAgent.cpp:
+ (WebCore::InspectorResourceAgent::buildInitiatorObject):
+ * inspector/InspectorTimelineAgent.cpp:
+ * inspector/InstrumentingAgents.cpp:
+ (WebCore::InstrumentingAgents::InstrumentingAgents):
+ (WebCore::InstrumentingAgents::reset):
+ * inspector/PageConsoleAgent.cpp:
+ (WebCore::PageConsoleAgent::PageConsoleAgent):
+ (WebCore::PageConsoleAgent::clearMessages):
+ (WebCore::PageConsoleAgent::addInspectedNode):
+ * inspector/PageConsoleAgent.h:
+ * inspector/PageDebuggerAgent.cpp:
+ (WebCore::PageDebuggerAgent::breakpointActionLog):
+ * inspector/PageInjectedScriptHost.h:
+ * inspector/PageInjectedScriptManager.h:
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createGenericRecord):
+ (WebCore::WebConsoleAgent::~WebConsoleAgent):
+ * inspector/WorkerConsoleAgent.cpp:
+ (WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
+ (WebCore::WorkerConsoleAgent::addInspectedNode):
+ * inspector/WorkerConsoleAgent.h:
+ * inspector/WorkerDebuggerAgent.cpp:
+ (WebCore::WorkerDebuggerAgent::breakpointActionLog):
+ * inspector/WorkerInspectorController.cpp:
+ (WebCore::WorkerInspectorController::WorkerInspectorController):
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::responseReceived):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::submitForm):
+ (WebCore::FrameLoader::reportLocalLoadFailed):
+ (WebCore::FrameLoader::handleBeforeUnloadEvent):
+ (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
+ (WebCore::createWindow):
+ * loader/ImageLoader.cpp:
+ (WebCore::ImageLoader::notifyFinished):
+ * loader/MixedContentChecker.cpp:
+ (WebCore::MixedContentChecker::logWarning):
+ * loader/TextTrackLoader.cpp:
+ (WebCore::TextTrackLoader::corsPolicyPreventedLoad):
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::abort):
+ (WebCore::ApplicationCacheGroup::didReceiveResponse):
+ (WebCore::ApplicationCacheGroup::didFinishLoading):
+ (WebCore::ApplicationCacheGroup::didFail):
+ (WebCore::ApplicationCacheGroup::didReceiveManifestResponse):
+ (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
+ (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
+ * loader/cache/CachedResourceLoader.cpp:
+ (WebCore::CachedResourceLoader::printAccessDeniedMessage):
+ * page/ChromeClient.h:
+ * page/Console.cpp:
+ (WebCore::internalAddMessage):
+ (WebCore::Console::debug):
+ (WebCore::Console::error):
+ (WebCore::Console::log):
+ (WebCore::Console::warn):
+ (WebCore::Console::dir):
+ (WebCore::Console::dirxml):
+ (WebCore::Console::table):
+ (WebCore::Console::clear):
+ (WebCore::Console::trace):
+ (WebCore::Console::assertCondition):
+ (WebCore::Console::group):
+ (WebCore::Console::groupCollapsed):
+ (WebCore::Console::groupEnd):
+ * page/Console.h:
+ * page/ConsoleTypes.h: Removed.
+ * page/ContentSecurityPolicy.cpp:
+ (WebCore::ContentSecurityPolicy::reportViolation):
+ (WebCore::ContentSecurityPolicy::logToConsole):
+ * page/DOMSecurityPolicy.cpp:
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::postMessage):
+ (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
+ (WebCore::DOMWindow::close):
+ (WebCore::DOMWindow::printErrorMessage):
+ * page/DOMWindow.h:
+ * page/EventSource.cpp:
+ (WebCore::EventSource::didReceiveResponse):
+ (WebCore::EventSource::didFailAccessControlCheck):
+ * page/PageConsole.cpp:
+ (WebCore::PageConsole::printMessageSourceAndLevelPrefix):
+ (WebCore::PageConsole::addMessage):
+ * page/PageConsole.h:
+ * page/PointerLockController.cpp:
+ (WebCore::PointerLockController::requestPointerLock):
+ * platform/CrossThreadCopier.h:
+ * rendering/shapes/ShapeInfo.cpp:
+ (WebCore::checkShapeImageOrigin):
+ * svg/SVGDocumentExtensions.cpp:
+ (WebCore::reportMessage):
+ (WebCore::SVGDocumentExtensions::reportWarning):
+ (WebCore::SVGDocumentExtensions::reportError):
+ * testing/Internals.cpp:
+ (WebCore::Internals::consoleMessageArgumentCounts):
+ * workers/DefaultSharedWorkerRepository.cpp:
+ * workers/SharedWorkerGlobalScope.cpp:
+ (WebCore::SharedWorkerGlobalScope::logExceptionToConsole):
+ * workers/SharedWorkerGlobalScope.h:
+ * workers/WorkerGlobalScope.cpp:
+ (WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
+ * workers/WorkerGlobalScope.h:
+ * workers/WorkerMessagingProxy.cpp:
+ * workers/WorkerReportingProxy.h:
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::logConsoleError):
+ (WebCore::XMLHttpRequest::send):
+ * xml/XSLTProcessorLibxslt.cpp:
+ (WebCore::XSLTProcessor::parseErrorFunc):
+
+2014-02-06 Joseph Pecoraro <pecoraro@apple.com>
+
Convert a parameter to PassRefPtr
https://bugs.webkit.org/show_bug.cgi?id=128327
diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make
index 0f6dbc4..c28dd96 100644
--- a/Source/WebCore/DerivedSources.make
+++ b/Source/WebCore/DerivedSources.make
@@ -1092,7 +1092,6 @@
$(WebCore)/inspector/protocol/ApplicationCache.json \
$(WebCore)/inspector/protocol/CSS.json \
$(WebCore)/inspector/protocol/Canvas.json \
- $(WebCore)/inspector/protocol/Console.json \
$(WebCore)/inspector/protocol/DOM.json \
$(WebCore)/inspector/protocol/DOMDebugger.json \
$(WebCore)/inspector/protocol/DOMStorage.json \
diff --git a/Source/WebCore/ForwardingHeaders/inspector/ConsoleMessage.h b/Source/WebCore/ForwardingHeaders/inspector/ConsoleMessage.h
new file mode 100644
index 0000000..cd57d16
--- /dev/null
+++ b/Source/WebCore/ForwardingHeaders/inspector/ConsoleMessage.h
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_ConsoleMessage_h
+#define WebCore_FWD_ConsoleMessage_h
+#include <JavaScriptCore/ConsoleMessage.h>
+#endif
diff --git a/Source/WebCore/ForwardingHeaders/inspector/ConsoleTypes.h b/Source/WebCore/ForwardingHeaders/inspector/ConsoleTypes.h
new file mode 100644
index 0000000..7b729d7
--- /dev/null
+++ b/Source/WebCore/ForwardingHeaders/inspector/ConsoleTypes.h
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_ConsoleTypes_h
+#define WebCore_FWD_ConsoleTypes_h
+#include <JavaScriptCore/ConsoleTypes.h>
+#endif
diff --git a/Source/WebCore/ForwardingHeaders/inspector/IdentifiersFactory.h b/Source/WebCore/ForwardingHeaders/inspector/IdentifiersFactory.h
new file mode 100644
index 0000000..8a135b4
--- /dev/null
+++ b/Source/WebCore/ForwardingHeaders/inspector/IdentifiersFactory.h
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_IdentifiersFactory_h
+#define WebCore_FWD_IdentifiersFactory_h
+#include <JavaScriptCore/IdentifiersFactory.h>
+#endif
diff --git a/Source/WebCore/ForwardingHeaders/inspector/ScriptArguments.h b/Source/WebCore/ForwardingHeaders/inspector/ScriptArguments.h
new file mode 100644
index 0000000..05a6f98
--- /dev/null
+++ b/Source/WebCore/ForwardingHeaders/inspector/ScriptArguments.h
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_ScriptArguments_h
+#define WebCore_FWD_ScriptArguments_h
+#include <JavaScriptCore/ScriptArguments.h>
+#endif
diff --git a/Source/WebCore/ForwardingHeaders/inspector/ScriptCallFrame.h b/Source/WebCore/ForwardingHeaders/inspector/ScriptCallFrame.h
new file mode 100644
index 0000000..0767858
--- /dev/null
+++ b/Source/WebCore/ForwardingHeaders/inspector/ScriptCallFrame.h
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_ScriptCallFrame_h
+#define WebCore_FWD_ScriptCallFrame_h
+#include <JavaScriptCore/ScriptCallFrame.h>
+#endif
diff --git a/Source/WebCore/ForwardingHeaders/inspector/ScriptCallStack.h b/Source/WebCore/ForwardingHeaders/inspector/ScriptCallStack.h
new file mode 100644
index 0000000..7d97f7d
--- /dev/null
+++ b/Source/WebCore/ForwardingHeaders/inspector/ScriptCallStack.h
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_ScriptCallStack_h
+#define WebCore_FWD_ScriptCallStack_h
+#include <JavaScriptCore/ScriptCallStack.h>
+#endif
diff --git a/Source/WebCore/ForwardingHeaders/inspector/ScriptCallStackFactory.h b/Source/WebCore/ForwardingHeaders/inspector/ScriptCallStackFactory.h
new file mode 100644
index 0000000..441e7c4
--- /dev/null
+++ b/Source/WebCore/ForwardingHeaders/inspector/ScriptCallStackFactory.h
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_ScriptCallStackFactory_h
+#define WebCore_FWD_ScriptCallStackFactory_h
+#include <JavaScriptCore/ScriptCallStackFactory.h>
+#endif
diff --git a/Source/WebCore/ForwardingHeaders/inspector/agents/InspectorConsoleAgent.h b/Source/WebCore/ForwardingHeaders/inspector/agents/InspectorConsoleAgent.h
new file mode 100644
index 0000000..2feceaa
--- /dev/null
+++ b/Source/WebCore/ForwardingHeaders/inspector/agents/InspectorConsoleAgent.h
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_InspectorConsoleAgent_h
+#define WebCore_FWD_InspectorConsoleAgent_h
+#include <JavaScriptCore/InspectorConsoleAgent.h>
+#endif
diff --git a/Source/WebCore/GNUmakefile.am b/Source/WebCore/GNUmakefile.am
index 6e48954..2e2accb 100644
--- a/Source/WebCore/GNUmakefile.am
+++ b/Source/WebCore/GNUmakefile.am
@@ -337,7 +337,6 @@
$(WebCore)/inspector/protocol/ApplicationCache.json \
$(WebCore)/inspector/protocol/CSS.json \
$(WebCore)/inspector/protocol/Canvas.json \
- $(WebCore)/inspector/protocol/Console.json \
$(WebCore)/inspector/protocol/DOM.json \
$(WebCore)/inspector/protocol/DOMDebugger.json \
$(WebCore)/inspector/protocol/DOMStorage.json \
diff --git a/Source/WebCore/GNUmakefile.list.am b/Source/WebCore/GNUmakefile.list.am
index 193975e..2877ddf 100644
--- a/Source/WebCore/GNUmakefile.list.am
+++ b/Source/WebCore/GNUmakefile.list.am
@@ -2436,8 +2436,6 @@
Source/WebCore/bindings/js/ScheduledAction.h \
Source/WebCore/bindings/js/ScriptCachedFrameData.cpp \
Source/WebCore/bindings/js/ScriptCachedFrameData.h \
- Source/WebCore/bindings/js/ScriptCallStackFactory.cpp \
- Source/WebCore/bindings/js/ScriptCallStackFactory.h \
Source/WebCore/bindings/js/ScriptController.cpp \
Source/WebCore/bindings/js/ScriptController.h \
Source/WebCore/bindings/js/ScriptHeapSnapshot.h \
@@ -3744,15 +3742,10 @@
Source/WebCore/inspector/CommandLineAPIHost.h \
Source/WebCore/inspector/CommandLineAPIModule.cpp \
Source/WebCore/inspector/CommandLineAPIModule.h \
- Source/WebCore/inspector/ConsoleAPITypes.h \
- Source/WebCore/inspector/ConsoleMessage.cpp \
- Source/WebCore/inspector/ConsoleMessage.h \
Source/WebCore/inspector/DOMEditor.cpp \
Source/WebCore/inspector/DOMEditor.h \
Source/WebCore/inspector/DOMPatchSupport.cpp \
Source/WebCore/inspector/DOMPatchSupport.h \
- Source/WebCore/inspector/IdentifiersFactory.cpp \
- Source/WebCore/inspector/IdentifiersFactory.h \
Source/WebCore/inspector/InjectedScriptCanvasModule.cpp \
Source/WebCore/inspector/InjectedScriptCanvasModule.h \
Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp \
@@ -3764,8 +3757,6 @@
Source/WebCore/inspector/InspectorClient.h \
Source/WebCore/inspector/InspectorController.cpp \
Source/WebCore/inspector/InspectorController.h \
- Source/WebCore/inspector/InspectorConsoleAgent.cpp \
- Source/WebCore/inspector/InspectorConsoleAgent.h \
Source/WebCore/inspector/InspectorConsoleInstrumentation.h \
Source/WebCore/inspector/InspectorCounters.cpp \
Source/WebCore/inspector/InspectorCounters.h \
@@ -3838,14 +3829,10 @@
Source/WebCore/inspector/PageInjectedScriptManager.h \
Source/WebCore/inspector/PageRuntimeAgent.cpp \
Source/WebCore/inspector/PageRuntimeAgent.h \
- Source/WebCore/inspector/ScriptArguments.cpp \
- Source/WebCore/inspector/ScriptArguments.h \
- Source/WebCore/inspector/ScriptCallFrame.cpp \
- Source/WebCore/inspector/ScriptCallFrame.h \
- Source/WebCore/inspector/ScriptCallStack.cpp \
- Source/WebCore/inspector/ScriptCallStack.h \
Source/WebCore/inspector/TimelineRecordFactory.cpp \
Source/WebCore/inspector/TimelineRecordFactory.h \
+ Source/WebCore/inspector/WebConsoleAgent.cpp \
+ Source/WebCore/inspector/WebConsoleAgent.h \
Source/WebCore/inspector/WebDebuggerAgent.cpp \
Source/WebCore/inspector/WebDebuggerAgent.h \
Source/WebCore/inspector/WorkerConsoleAgent.cpp \
@@ -4054,7 +4041,6 @@
Source/WebCore/page/ChromeClient.h \
Source/WebCore/page/Console.cpp \
Source/WebCore/page/Console.h \
- Source/WebCore/page/ConsoleTypes.h \
Source/WebCore/page/ContentSecurityPolicy.cpp \
Source/WebCore/page/ContentSecurityPolicy.h \
Source/WebCore/page/ContextMenuClient.h \
diff --git a/Source/WebCore/Modules/indexeddb/IDBCursor.cpp b/Source/WebCore/Modules/indexeddb/IDBCursor.cpp
index f6ea30e..91a77e8 100644
--- a/Source/WebCore/Modules/indexeddb/IDBCursor.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBCursor.cpp
@@ -37,8 +37,8 @@
#include "IDBRequest.h"
#include "IDBTransaction.h"
#include "Logging.h"
-#include "ScriptCallStack.h"
#include "ScriptExecutionContext.h"
+#include <inspector/ScriptCallStack.h>
#include <limits>
namespace WebCore {
diff --git a/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp b/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp
index 401119a..83e47df 100644
--- a/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp
@@ -44,9 +44,9 @@
#include "IDBTransaction.h"
#include "IDBVersionChangeEvent.h"
#include "Logging.h"
-#include "ScriptCallStack.h"
#include "ScriptExecutionContext.h"
#include <atomic>
+#include <inspector/ScriptCallStack.h>
#include <limits>
#include <wtf/Atomics.h>
diff --git a/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp b/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
index 8d6d53a..ff250db 100644
--- a/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
@@ -39,7 +39,6 @@
#include "IDBOpenDBRequest.h"
#include "IDBPendingTransactionMonitor.h"
#include "Logging.h"
-#include "ScriptCallStack.h"
#include "ScriptExecutionContext.h"
namespace WebCore {
diff --git a/Source/WebCore/Modules/quota/DOMWindowQuota.cpp b/Source/WebCore/Modules/quota/DOMWindowQuota.cpp
index ea3d659..2270a04 100644
--- a/Source/WebCore/Modules/quota/DOMWindowQuota.cpp
+++ b/Source/WebCore/Modules/quota/DOMWindowQuota.cpp
@@ -75,7 +75,7 @@
StorageInfo* DOMWindowQuota::webkitStorageInfo() const
{
if (!m_storageInfo && frame()) {
- frame()->document()->addConsoleMessage(JSMessageSource, WarningMessageLevel, "window.webkitStorageInfo is deprecated. Use navigator.webkitTemporaryStorage or navigator.webkitPersistentStorage instead.");
+ frame()->document()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("window.webkitStorageInfo is deprecated. Use navigator.webkitTemporaryStorage or navigator.webkitPersistentStorage instead."));
m_storageInfo = StorageInfo::create();
}
return m_storageInfo.get();
diff --git a/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp b/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
index 8ee6d61..6200fc9 100644
--- a/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
+++ b/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
@@ -32,10 +32,10 @@
#include "AudioNodeOutput.h"
#include "AudioUtilities.h"
#include "FloatConversion.h"
-#include "ScriptCallStack.h"
#include "ScriptController.h"
#include "ScriptExecutionContext.h"
#include <algorithm>
+#include <inspector/ScriptCallStack.h>
#include <wtf/MainThread.h>
#include <wtf/MathExtras.h>
#include <wtf/StdLibExtras.h>
@@ -460,7 +460,7 @@
{
static bool firstTime = true;
if (firstTime && context() && context()->scriptExecutionContext()) {
- context()->scriptExecutionContext()->addConsoleMessage(JSMessageSource, WarningMessageLevel, "AudioBufferSourceNode 'looping' attribute is deprecated. Use 'loop' instead.");
+ context()->scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("AudioBufferSourceNode 'looping' attribute is deprecated. Use 'loop' instead."));
firstTime = false;
}
@@ -471,7 +471,7 @@
{
static bool firstTime = true;
if (firstTime && context() && context()->scriptExecutionContext()) {
- context()->scriptExecutionContext()->addConsoleMessage(JSMessageSource, WarningMessageLevel, "AudioBufferSourceNode 'looping' attribute is deprecated. Use 'loop' instead.");
+ context()->scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("AudioBufferSourceNode 'looping' attribute is deprecated. Use 'loop' instead."));
firstTime = false;
}
diff --git a/Source/WebCore/Modules/webaudio/AudioContext.cpp b/Source/WebCore/Modules/webaudio/AudioContext.cpp
index 4854ff0..ac22503 100644
--- a/Source/WebCore/Modules/webaudio/AudioContext.cpp
+++ b/Source/WebCore/Modules/webaudio/AudioContext.cpp
@@ -55,7 +55,7 @@
#include "Page.h"
#include "PannerNode.h"
#include "PeriodicWave.h"
-#include "ScriptCallStack.h"
+#include <inspector/ScriptCallStack.h>
#include "ScriptController.h"
#include "ScriptProcessorNode.h"
#include "WaveShaperNode.h"
diff --git a/Source/WebCore/Modules/webaudio/PannerNode.cpp b/Source/WebCore/Modules/webaudio/PannerNode.cpp
index 17bf130..822589f 100644
--- a/Source/WebCore/Modules/webaudio/PannerNode.cpp
+++ b/Source/WebCore/Modules/webaudio/PannerNode.cpp
@@ -205,7 +205,7 @@
break;
case SOUNDFIELD:
// FIXME: Implement sound field model. See // https://bugs.webkit.org/show_bug.cgi?id=77367.
- context()->scriptExecutionContext()->addConsoleMessage(JSMessageSource, WarningMessageLevel, "'soundfield' panning model not implemented.");
+ context()->scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("'soundfield' panning model not implemented."));
break;
default:
return false;
diff --git a/Source/WebCore/Modules/webdatabase/DatabaseBase.cpp b/Source/WebCore/Modules/webdatabase/DatabaseBase.cpp
index af2377a..5f10bda 100644
--- a/Source/WebCore/Modules/webdatabase/DatabaseBase.cpp
+++ b/Source/WebCore/Modules/webdatabase/DatabaseBase.cpp
@@ -46,7 +46,7 @@
void DatabaseBase::logErrorMessage(const String& message)
{
- m_scriptExecutionContext->addConsoleMessage(StorageMessageSource, ErrorMessageLevel, message);
+ m_scriptExecutionContext->addConsoleMessage(MessageSource::Storage, MessageLevel::Error, message);
}
} // namespace WebCore
diff --git a/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp b/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp
index 0b60c96..1f025ad 100644
--- a/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp
+++ b/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp
@@ -467,7 +467,7 @@
void DatabaseManager::logErrorMessage(ScriptExecutionContext* context, const String& message)
{
- context->addConsoleMessage(StorageMessageSource, ErrorMessageLevel, message);
+ context->addConsoleMessage(MessageSource::Storage, MessageLevel::Error, message);
}
} // namespace WebCore
diff --git a/Source/WebCore/Modules/websockets/WebSocket.cpp b/Source/WebCore/Modules/websockets/WebSocket.cpp
index 72b192a..d3160d6 100644
--- a/Source/WebCore/Modules/websockets/WebSocket.cpp
+++ b/Source/WebCore/Modules/websockets/WebSocket.cpp
@@ -48,12 +48,12 @@
#include "Frame.h"
#include "Logging.h"
#include "MessageEvent.h"
-#include "ScriptCallStack.h"
#include "ScriptController.h"
#include "ScriptExecutionContext.h"
#include "SecurityOrigin.h"
#include "ThreadableWebSocketChannel.h"
#include "WebSocketChannel.h"
+#include <inspector/ScriptCallStack.h>
#include <runtime/ArrayBuffer.h>
#include <runtime/ArrayBufferView.h>
#include <wtf/HashSet.h>
@@ -214,26 +214,26 @@
m_url = URL(URL(), url);
if (!m_url.isValid()) {
- scriptExecutionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Invalid url for WebSocket " + m_url.stringCenterEllipsizedToLength());
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "Invalid url for WebSocket " + m_url.stringCenterEllipsizedToLength());
m_state = CLOSED;
ec = SYNTAX_ERR;
return;
}
if (!m_url.protocolIs("ws") && !m_url.protocolIs("wss")) {
- scriptExecutionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Wrong url scheme for WebSocket " + m_url.stringCenterEllipsizedToLength());
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "Wrong url scheme for WebSocket " + m_url.stringCenterEllipsizedToLength());
m_state = CLOSED;
ec = SYNTAX_ERR;
return;
}
if (m_url.hasFragmentIdentifier()) {
- scriptExecutionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "URL has fragment component " + m_url.stringCenterEllipsizedToLength());
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "URL has fragment component " + m_url.stringCenterEllipsizedToLength());
m_state = CLOSED;
ec = SYNTAX_ERR;
return;
}
if (!portAllowed(m_url)) {
- scriptExecutionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "WebSocket port " + String::number(m_url.port()) + " blocked");
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "WebSocket port " + String::number(m_url.port()) + " blocked");
m_state = CLOSED;
ec = SECURITY_ERR;
return;
@@ -264,7 +264,7 @@
// comply with WebSocket API specification, but it seems to be the only reasonable way to handle this conflict.
for (size_t i = 0; i < protocols.size(); ++i) {
if (!isValidProtocolString(protocols[i])) {
- scriptExecutionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Wrong protocol for WebSocket '" + encodeProtocolString(protocols[i]) + "'");
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "Wrong protocol for WebSocket '" + encodeProtocolString(protocols[i]) + "'");
m_state = CLOSED;
ec = SYNTAX_ERR;
return;
@@ -273,7 +273,7 @@
HashSet<String> visited;
for (size_t i = 0; i < protocols.size(); ++i) {
if (!visited.add(protocols[i]).isNewEntry) {
- scriptExecutionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "WebSocket protocols contain duplicates: '" + encodeProtocolString(protocols[i]) + "'");
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "WebSocket protocols contain duplicates: '" + encodeProtocolString(protocols[i]) + "'");
m_state = CLOSED;
ec = SYNTAX_ERR;
return;
@@ -305,7 +305,7 @@
ASSERT(m_channel);
ThreadableWebSocketChannel::SendResult result = m_channel->send(message);
if (result == ThreadableWebSocketChannel::InvalidMessage) {
- scriptExecutionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Websocket message contains invalid character(s).");
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Websocket message contains invalid character(s)."));
ec = SYNTAX_ERR;
return;
}
@@ -378,7 +378,7 @@
}
CString utf8 = reason.utf8(StrictConversionReplacingUnpairedSurrogatesWithFFFD);
if (utf8.length() > maxReasonSizeInBytes) {
- scriptExecutionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "WebSocket close message is too long.");
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("WebSocket close message is too long."));
ec = SYNTAX_ERR;
return;
}
@@ -443,7 +443,7 @@
m_binaryType = BinaryTypeArrayBuffer;
return;
}
- scriptExecutionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "'" + binaryType + "' is not a valid value for binaryType; binaryType remains unchanged.");
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "'" + binaryType + "' is not a valid value for binaryType; binaryType remains unchanged.");
}
EventTargetInterface WebSocket::eventTargetInterface() const
diff --git a/Source/WebCore/Modules/websockets/WebSocketChannel.cpp b/Source/WebCore/Modules/websockets/WebSocketChannel.cpp
index 7164edc..81c6f76 100644
--- a/Source/WebCore/Modules/websockets/WebSocketChannel.cpp
+++ b/Source/WebCore/Modules/websockets/WebSocketChannel.cpp
@@ -48,14 +48,12 @@
#include "Page.h"
#include "ProgressTracker.h"
#include "ResourceRequest.h"
-#include "ScriptCallStack.h"
#include "ScriptExecutionContext.h"
#include "Settings.h"
#include "SocketStreamError.h"
#include "SocketStreamHandle.h"
#include "WebSocketChannelClient.h"
#include "WebSocketHandshake.h"
-
#include <runtime/ArrayBuffer.h>
#include <wtf/Deque.h>
#include <wtf/FastMalloc.h>
@@ -198,7 +196,7 @@
ASSERT(!m_suspended);
if (m_document) {
InspectorInstrumentation::didReceiveWebSocketFrameError(m_document, m_identifier, reason);
- m_document->addConsoleMessage(NetworkMessageSource, ErrorMessageLevel, "WebSocket connection to '" + m_handshake->url().stringCenterEllipsizedToLength() + "' failed: " + reason);
+ m_document->addConsoleMessage(MessageSource::Network, MessageLevel::Error, "WebSocket connection to '" + m_handshake->url().stringCenterEllipsizedToLength() + "' failed: " + reason);
}
// Hybi-10 specification explicitly states we must not continue to handle incoming data
@@ -335,7 +333,7 @@
else
message = "WebSocket network error: " + error.localizedDescription();
InspectorInstrumentation::didReceiveWebSocketFrameError(m_document, m_identifier, message);
- m_document->addConsoleMessage(NetworkMessageSource, ErrorMessageLevel, message);
+ m_document->addConsoleMessage(MessageSource::Network, MessageLevel::Error, message);
}
m_shouldDiscardReceivedData = true;
handle->disconnect();
diff --git a/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp b/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp
index e6782cf..686f4d6 100644
--- a/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp
+++ b/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp
@@ -44,7 +44,6 @@
#include "URL.h"
#include "Logging.h"
#include "ResourceRequest.h"
-#include "ScriptCallStack.h"
#include "ScriptExecutionContext.h"
#include "SecurityOrigin.h"
#include <wtf/CryptographicallyRandomNumber.h>
diff --git a/Source/WebCore/UseJSC.cmake b/Source/WebCore/UseJSC.cmake
index 372e5d9..28dcae4 100644
--- a/Source/WebCore/UseJSC.cmake
+++ b/Source/WebCore/UseJSC.cmake
@@ -159,7 +159,6 @@
bindings/js/PageScriptDebugServer.cpp
bindings/js/ScheduledAction.cpp
bindings/js/ScriptCachedFrameData.cpp
- bindings/js/ScriptCallStackFactory.cpp
bindings/js/ScriptController.cpp
bindings/js/ScriptGlobalObject.cpp
bindings/js/ScriptProfile.cpp
diff --git a/Source/WebCore/WebCore.exp.in b/Source/WebCore/WebCore.exp.in
index 8ae2709..a5174c4 100644
--- a/Source/WebCore/WebCore.exp.in
+++ b/Source/WebCore/WebCore.exp.in
@@ -2791,7 +2791,6 @@
__ZN7WebCore19InspectorController39setResourcesDataSizeLimitsFromInternalsEii
__ZN7WebCore19InspectorController4showEv
__ZN7WebCore19InspectorController5closeEv
-__ZN7WebCore21InspectorConsoleAgent28consoleMessageArgumentCountsEv
__ZN7WebCore22instrumentationForPageEPNS_4PageE
__ZN7WebCore24InspectorInstrumentation17s_frontendCounterE
__ZN7WebCore24InspectorInstrumentation26instrumentingAgentsForPageEPNS_4PageE
diff --git a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
index bcc31e8..6a216c5 100644
--- a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
+++ b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
@@ -17189,20 +17189,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</ClCompile>
- <ClCompile Include="..\bindings\js\ScriptCallStackFactory.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
- </ClCompile>
<ClCompile Include="..\bindings\js\ScriptController.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -17479,14 +17465,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</ClCompile>
- <ClCompile Include="..\inspector\ConsoleMessage.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
- </ClCompile>
<ClCompile Include="..\inspector\DOMEditor.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
@@ -17503,14 +17481,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</ClCompile>
- <ClCompile Include="..\inspector\IdentifiersFactory.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
- </ClCompile>
<ClCompile Include="..\inspector\InjectedScriptCanvasModule.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
@@ -17551,14 +17521,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</ClCompile>
- <ClCompile Include="..\inspector\InspectorConsoleAgent.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
- </ClCompile>
<ClCompile Include="..\inspector\InspectorController.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
@@ -17831,30 +17793,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</ClCompile>
- <ClCompile Include="..\inspector\ScriptArguments.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\inspector\ScriptCallFrame.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\inspector\ScriptCallStack.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
- </ClCompile>
<ClCompile Include="..\inspector\TimelineRecordFactory.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
@@ -17863,6 +17801,14 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</ClCompile>
+ <ClCompile Include="..\inspector\WebConsoleAgent.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="..\inspector\WebDebuggerAgent.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
@@ -18468,6 +18414,9 @@
<ClInclude Include="..\ForwardingHeaders\heap\SlotVisitor.h" />
<ClInclude Include="..\ForwardingHeaders\heap\StrongInlines.h" />
<ClInclude Include="..\ForwardingHeaders\heap\Weak.h" />
+ <ClInclude Include="..\ForwardingHeaders\inspector\ConsoleMessage.h" />
+ <ClInclude Include="..\ForwardingHeaders\inspector\ConsoleTypes.h" />
+ <ClInclude Include="..\ForwardingHeaders\inspector\IdentifiersFactory.h" />
<ClInclude Include="..\ForwardingHeaders\inspector\InjectedScript.h" />
<ClInclude Include="..\ForwardingHeaders\inspector\InjectedScriptBase.h" />
<ClInclude Include="..\ForwardingHeaders\inspector\InjectedScriptHost.h" />
@@ -18483,7 +18432,14 @@
<ClInclude Include="..\ForwardingHeaders\inspector\InspectorJSTypeBuilders.h" />
<ClInclude Include="..\ForwardingHeaders\inspector\InspectorTypeBuilder.h" />
<ClInclude Include="..\ForwardingHeaders\inspector\InspectorValues.h" />
+ <ClInclude Include="..\ForwardingHeaders\inspector\ScriptArguments.h" />
+ <ClInclude Include="..\ForwardingHeaders\inspector\ScriptBreakpoint.h" />
+ <ClInclude Include="..\ForwardingHeaders\inspector\ScriptCallFrame.h" />
+ <ClInclude Include="..\ForwardingHeaders\inspector\ScriptCallStack.h" />
+ <ClInclude Include="..\ForwardingHeaders\inspector\ScriptCallStackFactory.h" />
<ClInclude Include="..\ForwardingHeaders\inspector\agents\InspectorAgent.h" />
+ <ClInclude Include="..\ForwardingHeaders\inspector\agents\InspectorConsoleAgent.h" />
+ <ClInclude Include="..\ForwardingHeaders\inspector\agents\InspectorDebuggerAgent.h" />
<ClInclude Include="..\ForwardingHeaders\inspector\agents\InspectorRuntimeAgent.h" />
<ClInclude Include="..\ForwardingHeaders\masm\X86Assembler.h" />
<ClInclude Include="..\ForwardingHeaders\parser\SourceCode.h" />
@@ -18737,7 +18693,6 @@
<ClInclude Include="..\page\ChromeClient.h" />
<ClInclude Include="..\page\animation\CompositeAnimation.h" />
<ClInclude Include="..\page\Console.h" />
- <ClInclude Include="..\page\ConsoleTypes.h" />
<ClInclude Include="..\page\ContentSecurityPolicy.h" />
<ClInclude Include="..\page\ContextMenuClient.h" />
<ClInclude Include="..\page\ContextMenuController.h" />
@@ -20513,7 +20468,6 @@
<ClInclude Include="..\bindings\js\PageScriptDebugServer.h" />
<ClInclude Include="..\bindings\js\ScheduledAction.h" />
<ClInclude Include="..\bindings\js\ScriptCachedFrameData.h" />
- <ClInclude Include="..\bindings\js\ScriptCallStackFactory.h" />
<ClInclude Include="..\bindings\js\ScriptController.h" />
<ClInclude Include="..\bindings\js\ScriptHeapSnapshot.h" />
<ClInclude Include="..\bindings\js\ScriptGlobalObject.h" />
@@ -20817,19 +20771,15 @@
<ClInclude Include="..\bridge\runtime_method.h" />
<ClInclude Include="..\bridge\runtime_object.h" />
<ClInclude Include="..\bridge\runtime_root.h" />
- <ClInclude Include="..\inspector\ConsoleAPITypes.h" />
<ClInclude Include="..\inspector\CommandLineAPIHost.h" />
<ClInclude Include="..\inspector\CommandLineAPIModule.h" />
- <ClInclude Include="..\inspector\ConsoleMessage.h" />
<ClInclude Include="..\inspector\DOMEditor.h" />
<ClInclude Include="..\inspector\DOMPatchSupport.h" />
- <ClInclude Include="..\inspector\IdentifiersFactory.h" />
<ClInclude Include="..\inspector\InjectedScriptCanvasModule.h" />
<ClInclude Include="..\inspector\InspectorApplicationCacheAgent.h" />
<ClInclude Include="..\inspector\InspectorCanvasAgent.h" />
<ClInclude Include="..\inspector\InspectorCanvasInstrumentation.h" />
<ClInclude Include="..\inspector\InspectorClient.h" />
- <ClInclude Include="..\inspector\InspectorConsoleAgent.h" />
<ClInclude Include="..\inspector\InspectorConsoleInstrumentation.h" />
<ClInclude Include="..\inspector\InspectorController.h" />
<ClInclude Include="..\inspector\InspectorCounters.h" />
@@ -20870,10 +20820,8 @@
<ClInclude Include="..\inspector\PageInjectedScriptHost.h" />
<ClInclude Include="..\inspector\PageInjectedScriptManager.h" />
<ClInclude Include="..\inspector\PageRuntimeAgent.h" />
- <ClInclude Include="..\inspector\ScriptArguments.h" />
- <ClInclude Include="..\inspector\ScriptCallFrame.h" />
- <ClInclude Include="..\inspector\ScriptCallStack.h" />
<ClInclude Include="..\inspector\TimelineRecordFactory.h" />
+ <ClInclude Include="..\inspector\WebConsoleAgent.h" />
<ClInclude Include="..\inspector\WebDebuggerAgent.h" />
<ClInclude Include="..\inspector\WorkerConsoleAgent.h" />
<ClInclude Include="..\inspector\WorkerDebuggerAgent.h" />
diff --git a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
index eef78a5..b715d87 100644
--- a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
+++ b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
@@ -4494,9 +4494,6 @@
<ClCompile Include="..\bindings\js\ScriptCachedFrameData.cpp">
<Filter>bindings\js</Filter>
</ClCompile>
- <ClCompile Include="..\bindings\js\ScriptCallStackFactory.cpp">
- <Filter>bindings\js</Filter>
- </ClCompile>
<ClCompile Include="..\bindings\js\ScriptController.cpp">
<Filter>bindings\js</Filter>
</ClCompile>
@@ -4725,18 +4722,12 @@
<ClCompile Include="..\inspector\CommandLineAPIModule.cpp">
<Filter>inspector</Filter>
</ClCompile>
- <ClCompile Include="..\inspector\ConsoleMessage.cpp">
- <Filter>inspector</Filter>
- </ClCompile>
<ClCompile Include="..\inspector\DOMEditor.cpp">
<Filter>inspector</Filter>
</ClCompile>
<ClCompile Include="..\inspector\DOMPatchSupport.cpp">
<Filter>inspector</Filter>
</ClCompile>
- <ClCompile Include="..\inspector\IdentifiersFactory.cpp">
- <Filter>inspector</Filter>
- </ClCompile>
<ClCompile Include="..\inspector\InjectedScriptCanvasModule.cpp">
<Filter>inspector</Filter>
</ClCompile>
@@ -4752,9 +4743,6 @@
<ClCompile Include="..\inspector\InspectorClient.cpp">
<Filter>inspector</Filter>
</ClCompile>
- <ClCompile Include="..\inspector\InspectorConsoleAgent.cpp">
- <Filter>inspector</Filter>
- </ClCompile>
<ClCompile Include="..\inspector\InspectorController.cpp">
<Filter>inspector</Filter>
</ClCompile>
@@ -4854,18 +4842,12 @@
<ClCompile Include="..\inspector\PageRuntimeAgent.cpp">
<Filter>inspector</Filter>
</ClCompile>
- <ClCompile Include="..\inspector\ScriptArguments.cpp">
- <Filter>inspector</Filter>
- </ClCompile>
- <ClCompile Include="..\inspector\ScriptCallFrame.cpp">
- <Filter>inspector</Filter>
- </ClCompile>
- <ClCompile Include="..\inspector\ScriptCallStack.cpp">
- <Filter>inspector</Filter>
- </ClCompile>
<ClCompile Include="..\inspector\TimelineRecordFactory.cpp">
<Filter>inspector</Filter>
</ClCompile>
+ <ClCompile Include="..\inspector\WebConsoleAgent.cpp">
+ <Filter>inspector</Filter>
+ </ClCompile>
<ClCompile Include="..\inspector\WebDebuggerAgent.cpp">
<Filter>inspector</Filter>
</ClCompile>
@@ -7490,9 +7472,6 @@
<ClInclude Include="..\page\Console.h">
<Filter>page</Filter>
</ClInclude>
- <ClInclude Include="..\page\ConsoleTypes.h">
- <Filter>page</Filter>
- </ClInclude>
<ClInclude Include="..\page\ContentSecurityPolicy.h">
<Filter>page</Filter>
</ClInclude>
@@ -11351,9 +11330,6 @@
<ClInclude Include="..\bindings\js\ScriptCachedFrameData.h">
<Filter>bindings\js</Filter>
</ClInclude>
- <ClInclude Include="..\bindings\js\ScriptCallStackFactory.h">
- <Filter>bindings\js</Filter>
- </ClInclude>
<ClInclude Include="..\bindings\js\ScriptController.h">
<Filter>bindings\js</Filter>
</ClInclude>
@@ -12089,6 +12065,15 @@
<ClInclude Include="..\ForwardingHeaders\heap\Strong.h">
<Filter>ForwardingHeaders\heap</Filter>
</ClInclude>
+ <ClInclude Include="..\ForwardingHeaders\inspector\ConsoleMessage.h">
+ <Filter>ForwardingHeaders\inspector</Filter>
+ </ClInclude>
+ <ClInclude Include="..\ForwardingHeaders\inspector\ConsoleTypes.h">
+ <Filter>ForwardingHeaders\inspector</Filter>
+ </ClInclude>
+ <ClInclude Include="..\ForwardingHeaders\inspector\IdentifiersFactory.h">
+ <Filter>ForwardingHeaders\inspector</Filter>
+ </ClInclude>
<ClInclude Include="..\ForwardingHeaders\inspector\InjectedScript.h">
<Filter>ForwardingHeaders\inspector</Filter>
</ClInclude>
@@ -12134,9 +12119,30 @@
<ClInclude Include="..\ForwardingHeaders\inspector\InspectorValues.h">
<Filter>ForwardingHeaders\inspector</Filter>
</ClInclude>
+ <ClInclude Include="..\ForwardingHeaders\inspector\ScriptArguments.h">
+ <Filter>ForwardingHeaders\inspector</Filter>
+ </ClInclude>
+ <ClInclude Include="..\ForwardingHeaders\inspector\ScriptBreakpoint.h">
+ <Filter>ForwardingHeaders\inspector</Filter>
+ </ClInclude>
+ <ClInclude Include="..\ForwardingHeaders\inspector\ScriptCallFrame.h">
+ <Filter>ForwardingHeaders\inspector</Filter>
+ </ClInclude>
+ <ClInclude Include="..\ForwardingHeaders\inspector\ScriptCallStack.h">
+ <Filter>ForwardingHeaders\inspector</Filter>
+ </ClInclude>
+ <ClInclude Include="..\ForwardingHeaders\inspector\ScriptCallStackFactory.h">
+ <Filter>ForwardingHeaders\inspector</Filter>
+ </ClInclude>
<ClInclude Include="..\ForwardingHeaders\inspector\agents\InspectorAgent.h">
<Filter>ForwardingHeaders\inspector</Filter>
</ClInclude>
+ <ClInclude Include="..\ForwardingHeaders\inspector\agents\InspectorConsoleAgent.h">
+ <Filter>ForwardingHeaders\inspector</Filter>
+ </ClInclude>
+ <ClInclude Include="..\ForwardingHeaders\inspector\agents\InspectorDebuggerAgent.h">
+ <Filter>ForwardingHeaders\inspector</Filter>
+ </ClInclude>
<ClInclude Include="..\ForwardingHeaders\inspector\agents\InspectorRuntimeAgent.h">
<Filter>ForwardingHeaders\inspector</Filter>
</ClInclude>
@@ -12254,21 +12260,12 @@
<ClInclude Include="..\inspector\CommandLineAPIModule.h">
<Filter>inspector</Filter>
</ClInclude>
- <ClInclude Include="..\inspector\ConsoleAPITypes.h">
- <Filter>inspector</Filter>
- </ClInclude>
- <ClInclude Include="..\inspector\ConsoleMessage.h">
- <Filter>inspector</Filter>
- </ClInclude>
<ClInclude Include="..\inspector\DOMEditor.h">
<Filter>inspector</Filter>
</ClInclude>
<ClInclude Include="..\inspector\DOMPatchSupport.h">
<Filter>inspector</Filter>
</ClInclude>
- <ClInclude Include="..\inspector\IdentifiersFactory.h">
- <Filter>inspector</Filter>
- </ClInclude>
<ClInclude Include="..\inspector\InjectedScriptCanvasModule.h">
<Filter>inspector</Filter>
</ClInclude>
@@ -12284,9 +12281,6 @@
<ClInclude Include="..\inspector\InspectorClient.h">
<Filter>inspector</Filter>
</ClInclude>
- <ClInclude Include="..\inspector\InspectorConsoleAgent.h">
- <Filter>inspector</Filter>
- </ClInclude>
<ClInclude Include="..\inspector\InspectorConsoleInstrumentation.h">
<Filter>inspector</Filter>
</ClInclude>
@@ -12407,18 +12401,12 @@
<ClInclude Include="..\inspector\PageRuntimeAgent.h">
<Filter>inspector</Filter>
</ClInclude>
- <ClInclude Include="..\inspector\ScriptArguments.h">
- <Filter>inspector</Filter>
- </ClInclude>
- <ClInclude Include="..\inspector\ScriptCallFrame.h">
- <Filter>inspector</Filter>
- </ClInclude>
- <ClInclude Include="..\inspector\ScriptCallStack.h">
- <Filter>inspector</Filter>
- </ClInclude>
<ClInclude Include="..\inspector\TimelineRecordFactory.h">
<Filter>inspector</Filter>
</ClInclude>
+ <ClInclude Include="..\inspector\WebConsoleAgent.h">
+ <Filter>inspector</Filter>
+ </ClInclude>
<ClInclude Include="..\inspector\WebDebuggerAgent.h">
<Filter>inspector</Filter>
</ClInclude>
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
index aca855c..8c7ef41 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -1059,7 +1059,6 @@
2D9F0E1314FF1CBF00BA0FF7 /* linearSRGB.icc in Resources */ = {isa = PBXBuildFile; fileRef = 2D9F0E1214FF1CBF00BA0FF7 /* linearSRGB.icc */; };
2DBADE0B188E5915004D7981 /* WebCoreCALayerExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DBADE09188E5915004D7981 /* WebCoreCALayerExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
2DBADE0C188E5915004D7981 /* WebCoreCALayerExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DBADE0A188E5915004D7981 /* WebCoreCALayerExtras.mm */; };
- 2DF2E9D5166E39750035BEF2 /* ConsoleAPITypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DF2E9D4166E39740035BEF2 /* ConsoleAPITypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
2E0888D41148848A00AF4265 /* JSDOMFormData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E0888D21148848A00AF4265 /* JSDOMFormData.cpp */; };
2E0888D51148848A00AF4265 /* JSDOMFormData.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E0888D31148848A00AF4265 /* JSDOMFormData.h */; };
2E0888E6114884E200AF4265 /* JSDOMFormDataCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E0888E5114884E200AF4265 /* JSDOMFormDataCustom.cpp */; };
@@ -1341,10 +1340,6 @@
4167EBF5102962BA003D252A /* DefaultSharedWorkerRepository.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4167EBF3102962BA003D252A /* DefaultSharedWorkerRepository.cpp */; };
4167EBF6102962BA003D252A /* DefaultSharedWorkerRepository.h in Headers */ = {isa = PBXBuildFile; fileRef = 4167EBF4102962BA003D252A /* DefaultSharedWorkerRepository.h */; };
416E29A6102FA962007FC14E /* WorkerReportingProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 416E29A5102FA962007FC14E /* WorkerReportingProxy.h */; };
- 416E75BE0EDF8FD700360E1D /* ScriptCallStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 416E75BC0EDF8FD700360E1D /* ScriptCallStack.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 416E75BF0EDF8FD700360E1D /* ScriptCallStack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 416E75BD0EDF8FD700360E1D /* ScriptCallStack.cpp */; };
- 416E75CB0EDF90C700360E1D /* ScriptCallFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 416E75C90EDF90C700360E1D /* ScriptCallFrame.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 416E75CC0EDF90C700360E1D /* ScriptCallFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 416E75CA0EDF90C700360E1D /* ScriptCallFrame.cpp */; };
417253AA1354BBBC00360F2A /* MediaControlElements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 417253A81354BBBC00360F2A /* MediaControlElements.cpp */; };
417253AB1354BBBC00360F2A /* MediaControlElements.h in Headers */ = {isa = PBXBuildFile; fileRef = 417253A91354BBBC00360F2A /* MediaControlElements.h */; };
417DA6D913734E6E007C57FB /* Internals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 417DA4CF13734326007C57FB /* Internals.cpp */; };
@@ -1384,8 +1379,6 @@
41E1B1D10FF5986900576B3B /* AbstractWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E1B1CB0FF5986900576B3B /* AbstractWorker.h */; };
41E1B1D30FF5986900576B3B /* SharedWorker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41E1B1CD0FF5986900576B3B /* SharedWorker.cpp */; };
41E1B1D40FF5986900576B3B /* SharedWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E1B1CE0FF5986900576B3B /* SharedWorker.h */; };
- 41F0618E0F5F069800A07EAC /* ConsoleMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F0618C0F5F069800A07EAC /* ConsoleMessage.h */; };
- 41F0618F0F5F069800A07EAC /* ConsoleMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41F0618D0F5F069800A07EAC /* ConsoleMessage.cpp */; };
41F062140F5F192600A07EAC /* InspectorDatabaseResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F062120F5F192600A07EAC /* InspectorDatabaseResource.h */; };
41F062150F5F192600A07EAC /* InspectorDatabaseResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41F062130F5F192600A07EAC /* InspectorDatabaseResource.cpp */; };
41F066E40F64BCF600A07EAC /* ScriptGlobalObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F066E20F64BCF600A07EAC /* ScriptGlobalObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -1988,8 +1981,6 @@
5905ADC01302F3CE00F116DF /* XMLTreeViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5905ADBE1302F3CE00F116DF /* XMLTreeViewer.h */; };
590E1B4911E4EF4B0069F784 /* DeviceOrientationData.h in Headers */ = {isa = PBXBuildFile; fileRef = 590E1B4811E4EF4B0069F784 /* DeviceOrientationData.h */; settings = {ATTRIBUTES = (Private, ); }; };
590E1B4B11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 590E1B4A11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp */; };
- 5913A24113D49EBA00F5B05C /* IdentifiersFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5913A23F13D49EBA00F5B05C /* IdentifiersFactory.cpp */; };
- 5913A24213D49EBA00F5B05C /* IdentifiersFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 5913A24013D49EBA00F5B05C /* IdentifiersFactory.h */; };
59309A1111F4AE5800250603 /* DeviceOrientationClientMock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59309A1011F4AE5800250603 /* DeviceOrientationClientMock.cpp */; };
59309A1311F4AE6A00250603 /* DeviceOrientationClientMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 59309A1211F4AE6A00250603 /* DeviceOrientationClientMock.h */; settings = {ATTRIBUTES = (Private, ); }; };
598365DD1355F557001B185D /* JSPositionCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 598365DC1355F53C001B185D /* JSPositionCallback.h */; };
@@ -3634,6 +3625,8 @@
A5416FE618810EF80009FC5F /* YouTubeEmbedShadowElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A5416FE418810EF80009FC5F /* YouTubeEmbedShadowElement.h */; };
A54A82EC15228D2F00C72BA6 /* DOMNodePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = A54A82EA15228CA300C72BA6 /* DOMNodePrivate.h */; };
A54A82F115228DF600C72BA6 /* DOMNodePrivate.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = A54A82EA15228CA300C72BA6 /* DOMNodePrivate.h */; };
+ A56C5B9A189F34570082D13C /* WebConsoleAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A56C5B98189F34570082D13C /* WebConsoleAgent.cpp */; };
+ A56C5B9B189F34570082D13C /* WebConsoleAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = A56C5B99189F34570082D13C /* WebConsoleAgent.h */; };
A5732B0A136A161D005C8D7C /* DateComponents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5732B08136A161D005C8D7C /* DateComponents.cpp */; };
A5732B0B136A161D005C8D7C /* DateComponents.h in Headers */ = {isa = PBXBuildFile; fileRef = A5732B09136A161D005C8D7C /* DateComponents.h */; settings = {ATTRIBUTES = (Private, ); }; };
A5840E1C187B74D500843B10 /* InspectorInstrumentationCookie.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5840E1A187B74D500843B10 /* InspectorInstrumentationCookie.cpp */; };
@@ -5241,7 +5234,6 @@
BCE4413312F748E2009B84B8 /* RenderCombineText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCE4413112F748E2009B84B8 /* RenderCombineText.cpp */; };
BCE4413412F748E2009B84B8 /* RenderCombineText.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE4413212F748E2009B84B8 /* RenderCombineText.h */; };
BCE4413612F7490B009B84B8 /* FontWidthVariant.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE4413512F7490B009B84B8 /* FontWidthVariant.h */; settings = {ATTRIBUTES = (Private, ); }; };
- BCE5644E137A34D6007D2934 /* ConsoleTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE5644D137A34D6007D2934 /* ConsoleTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCE658FF0EA9248A007E4533 /* Theme.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE658FE0EA9248A007E4533 /* Theme.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCE659A90EA927B9007E4533 /* ThemeTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE659A80EA927B9007E4533 /* ThemeTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCE659E60EA92FB2007E4533 /* ThemeMac.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE659E50EA92FB2007E4533 /* ThemeMac.h */; };
@@ -6029,8 +6021,6 @@
F293B27E56C112F373FFF27E /* DNSResolveQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C60128060078BB70E367A95 /* DNSResolveQueue.cpp */; };
F325A40A14EE36FA007324E2 /* InspectorCounters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F325A40814EE36FA007324E2 /* InspectorCounters.cpp */; };
F325A40B14EE36FA007324E2 /* InspectorCounters.h in Headers */ = {isa = PBXBuildFile; fileRef = F325A40914EE36FA007324E2 /* InspectorCounters.h */; settings = {ATTRIBUTES = (Private, ); }; };
- F3335BF812E07DC300D33011 /* InspectorConsoleAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F3335BF612E07DC300D33011 /* InspectorConsoleAgent.cpp */; };
- F3335BF912E07DC300D33011 /* InspectorConsoleAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = F3335BF712E07DC300D33011 /* InspectorConsoleAgent.h */; };
F33F0282120947F200E5743A /* ScriptProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F33F0281120947F200E5743A /* ScriptProfile.cpp */; };
F344C7141125B82C00F26EEE /* InspectorFrontendClient.h in Headers */ = {isa = PBXBuildFile; fileRef = F344C7121125B82C00F26EEE /* InspectorFrontendClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
F344C75311294D9D00F26EEE /* InspectorFrontendClientLocal.h in Headers */ = {isa = PBXBuildFile; fileRef = F344C75211294D9D00F26EEE /* InspectorFrontendClientLocal.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -6057,10 +6047,6 @@
F3820897147D35F90010BC06 /* WorkerConsoleAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = F382088F147D35F90010BC06 /* WorkerConsoleAgent.h */; };
F3820898147D35F90010BC06 /* WorkerRuntimeAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F3820890147D35F90010BC06 /* WorkerRuntimeAgent.cpp */; };
F3820899147D35F90010BC06 /* WorkerRuntimeAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = F3820891147D35F90010BC06 /* WorkerRuntimeAgent.h */; };
- F392249C126F11AE00A926D9 /* ScriptCallStackFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F392249A126F11AE00A926D9 /* ScriptCallStackFactory.cpp */; };
- F392249D126F11AE00A926D9 /* ScriptCallStackFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = F392249B126F11AE00A926D9 /* ScriptCallStackFactory.h */; };
- F39BE95B12673BF400E0A674 /* ScriptArguments.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F39BE95912673BF400E0A674 /* ScriptArguments.cpp */; };
- F39BE95C12673BF400E0A674 /* ScriptArguments.h in Headers */ = {isa = PBXBuildFile; fileRef = F39BE95A12673BF400E0A674 /* ScriptArguments.h */; };
F3ABFE0C130E9DA000E7F7D1 /* InstrumentingAgents.h in Headers */ = {isa = PBXBuildFile; fileRef = F3ABFE0B130E9DA000E7F7D1 /* InstrumentingAgents.h */; };
F3D461481161D53200CA0D09 /* JSErrorHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F3D461461161D53200CA0D09 /* JSErrorHandler.cpp */; };
F3D461491161D53200CA0D09 /* JSErrorHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = F3D461471161D53200CA0D09 /* JSErrorHandler.h */; };
@@ -7868,7 +7854,6 @@
2D9F0E1214FF1CBF00BA0FF7 /* linearSRGB.icc */ = {isa = PBXFileReference; lastKnownFileType = file; path = linearSRGB.icc; sourceTree = "<group>"; };
2DBADE09188E5915004D7981 /* WebCoreCALayerExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreCALayerExtras.h; sourceTree = "<group>"; };
2DBADE0A188E5915004D7981 /* WebCoreCALayerExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreCALayerExtras.mm; sourceTree = "<group>"; };
- 2DF2E9D4166E39740035BEF2 /* ConsoleAPITypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleAPITypes.h; sourceTree = "<group>"; };
2E0888C3114883A900AF4265 /* DOMFormData.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMFormData.idl; sourceTree = "<group>"; };
2E0888D21148848A00AF4265 /* JSDOMFormData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMFormData.cpp; sourceTree = "<group>"; };
2E0888D31148848A00AF4265 /* JSDOMFormData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMFormData.h; sourceTree = "<group>"; };
@@ -8175,10 +8160,6 @@
4167EBF3102962BA003D252A /* DefaultSharedWorkerRepository.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DefaultSharedWorkerRepository.cpp; path = workers/DefaultSharedWorkerRepository.cpp; sourceTree = "<group>"; };
4167EBF4102962BA003D252A /* DefaultSharedWorkerRepository.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DefaultSharedWorkerRepository.h; path = workers/DefaultSharedWorkerRepository.h; sourceTree = "<group>"; };
416E29A5102FA962007FC14E /* WorkerReportingProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WorkerReportingProxy.h; path = workers/WorkerReportingProxy.h; sourceTree = "<group>"; };
- 416E75BC0EDF8FD700360E1D /* ScriptCallStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptCallStack.h; sourceTree = "<group>"; };
- 416E75BD0EDF8FD700360E1D /* ScriptCallStack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptCallStack.cpp; sourceTree = "<group>"; };
- 416E75C90EDF90C700360E1D /* ScriptCallFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptCallFrame.h; sourceTree = "<group>"; };
- 416E75CA0EDF90C700360E1D /* ScriptCallFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptCallFrame.cpp; sourceTree = "<group>"; };
417253A81354BBBC00360F2A /* MediaControlElements.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaControlElements.cpp; sourceTree = "<group>"; };
417253A91354BBBC00360F2A /* MediaControlElements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaControlElements.h; sourceTree = "<group>"; };
417DA4CE13734326007C57FB /* Internals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Internals.h; sourceTree = "<group>"; };
@@ -8224,8 +8205,6 @@
41E1B1CD0FF5986900576B3B /* SharedWorker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SharedWorker.cpp; path = workers/SharedWorker.cpp; sourceTree = "<group>"; };
41E1B1CE0FF5986900576B3B /* SharedWorker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharedWorker.h; path = workers/SharedWorker.h; sourceTree = "<group>"; };
41E1B1CF0FF5986900576B3B /* SharedWorker.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = SharedWorker.idl; path = workers/SharedWorker.idl; sourceTree = "<group>"; };
- 41F0618C0F5F069800A07EAC /* ConsoleMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleMessage.h; sourceTree = "<group>"; };
- 41F0618D0F5F069800A07EAC /* ConsoleMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConsoleMessage.cpp; sourceTree = "<group>"; };
41F062120F5F192600A07EAC /* InspectorDatabaseResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDatabaseResource.h; sourceTree = "<group>"; };
41F062130F5F192600A07EAC /* InspectorDatabaseResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDatabaseResource.cpp; sourceTree = "<group>"; };
41F066E20F64BCF600A07EAC /* ScriptGlobalObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptGlobalObject.h; sourceTree = "<group>"; };
@@ -8900,8 +8879,6 @@
5905ADBE1302F3CE00F116DF /* XMLTreeViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLTreeViewer.h; sourceTree = "<group>"; };
590E1B4811E4EF4B0069F784 /* DeviceOrientationData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceOrientationData.h; sourceTree = "<group>"; };
590E1B4A11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDeviceOrientationEventCustom.cpp; sourceTree = "<group>"; };
- 5913A23F13D49EBA00F5B05C /* IdentifiersFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IdentifiersFactory.cpp; sourceTree = "<group>"; };
- 5913A24013D49EBA00F5B05C /* IdentifiersFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdentifiersFactory.h; sourceTree = "<group>"; };
59309A1011F4AE5800250603 /* DeviceOrientationClientMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeviceOrientationClientMock.cpp; sourceTree = "<group>"; };
59309A1211F4AE6A00250603 /* DeviceOrientationClientMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceOrientationClientMock.h; sourceTree = "<group>"; };
5958F1CB1343917C0080B31F /* XMLViewer.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = XMLViewer.css; sourceTree = "<group>"; };
@@ -10602,6 +10579,8 @@
A5416FE318810EF80009FC5F /* YouTubeEmbedShadowElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = YouTubeEmbedShadowElement.cpp; sourceTree = "<group>"; };
A5416FE418810EF80009FC5F /* YouTubeEmbedShadowElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YouTubeEmbedShadowElement.h; sourceTree = "<group>"; };
A54A82EA15228CA300C72BA6 /* DOMNodePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMNodePrivate.h; sourceTree = "<group>"; };
+ A56C5B98189F34570082D13C /* WebConsoleAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebConsoleAgent.cpp; sourceTree = "<group>"; };
+ A56C5B99189F34570082D13C /* WebConsoleAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebConsoleAgent.h; sourceTree = "<group>"; };
A5732B08136A161D005C8D7C /* DateComponents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DateComponents.cpp; sourceTree = "<group>"; };
A5732B09136A161D005C8D7C /* DateComponents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateComponents.h; sourceTree = "<group>"; };
A5840E1A187B74D500843B10 /* InspectorInstrumentationCookie.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorInstrumentationCookie.cpp; sourceTree = "<group>"; };
@@ -12447,7 +12426,6 @@
BCE4413112F748E2009B84B8 /* RenderCombineText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderCombineText.cpp; sourceTree = "<group>"; };
BCE4413212F748E2009B84B8 /* RenderCombineText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderCombineText.h; sourceTree = "<group>"; };
BCE4413512F7490B009B84B8 /* FontWidthVariant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontWidthVariant.h; sourceTree = "<group>"; };
- BCE5644D137A34D6007D2934 /* ConsoleTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleTypes.h; sourceTree = "<group>"; };
BCE658FE0EA9248A007E4533 /* Theme.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Theme.h; sourceTree = "<group>"; };
BCE659A80EA927B9007E4533 /* ThemeTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThemeTypes.h; sourceTree = "<group>"; };
BCE659E50EA92FB2007E4533 /* ThemeMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThemeMac.h; sourceTree = "<group>"; };
@@ -13349,8 +13327,6 @@
F12171F416A8BC63000053CA /* WebVTTElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVTTElement.h; sourceTree = "<group>"; };
F325A40814EE36FA007324E2 /* InspectorCounters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorCounters.cpp; sourceTree = "<group>"; };
F325A40914EE36FA007324E2 /* InspectorCounters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorCounters.h; sourceTree = "<group>"; };
- F3335BF612E07DC300D33011 /* InspectorConsoleAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorConsoleAgent.cpp; sourceTree = "<group>"; };
- F3335BF712E07DC300D33011 /* InspectorConsoleAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorConsoleAgent.h; sourceTree = "<group>"; };
F33F0281120947F200E5743A /* ScriptProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptProfile.cpp; sourceTree = "<group>"; };
F344C7121125B82C00F26EEE /* InspectorFrontendClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorFrontendClient.h; sourceTree = "<group>"; };
F344C75211294D9D00F26EEE /* InspectorFrontendClientLocal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorFrontendClientLocal.h; sourceTree = "<group>"; };
@@ -13377,10 +13353,6 @@
F382088F147D35F90010BC06 /* WorkerConsoleAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerConsoleAgent.h; sourceTree = "<group>"; };
F3820890147D35F90010BC06 /* WorkerRuntimeAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkerRuntimeAgent.cpp; sourceTree = "<group>"; };
F3820891147D35F90010BC06 /* WorkerRuntimeAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerRuntimeAgent.h; sourceTree = "<group>"; };
- F392249A126F11AE00A926D9 /* ScriptCallStackFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptCallStackFactory.cpp; sourceTree = "<group>"; };
- F392249B126F11AE00A926D9 /* ScriptCallStackFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptCallStackFactory.h; sourceTree = "<group>"; };
- F39BE95912673BF400E0A674 /* ScriptArguments.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptArguments.cpp; sourceTree = "<group>"; };
- F39BE95A12673BF400E0A674 /* ScriptArguments.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptArguments.h; sourceTree = "<group>"; };
F3ABFE0B130E9DA000E7F7D1 /* InstrumentingAgents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstrumentingAgents.h; sourceTree = "<group>"; };
F3D461461161D53200CA0D09 /* JSErrorHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSErrorHandler.cpp; sourceTree = "<group>"; };
F3D461471161D53200CA0D09 /* JSErrorHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSErrorHandler.h; sourceTree = "<group>"; };
@@ -14795,15 +14767,10 @@
A584FE291863870F00843B10 /* CommandLineAPIModule.cpp */,
A584FE2A1863870F00843B10 /* CommandLineAPIModule.h */,
A584FE2718637DCA00843B10 /* CommandLineAPIModuleSource.js */,
- 2DF2E9D4166E39740035BEF2 /* ConsoleAPITypes.h */,
- 41F0618D0F5F069800A07EAC /* ConsoleMessage.cpp */,
- 41F0618C0F5F069800A07EAC /* ConsoleMessage.h */,
7AABA25714BC613300AA9A11 /* DOMEditor.cpp */,
7AABA25814BC613300AA9A11 /* DOMEditor.h */,
7A54881614E432A1006AE05A /* DOMPatchSupport.cpp */,
7A54881514E432A1006AE05A /* DOMPatchSupport.h */,
- 5913A23F13D49EBA00F5B05C /* IdentifiersFactory.cpp */,
- 5913A24013D49EBA00F5B05C /* IdentifiersFactory.h */,
AA73183C159255B900A93E6E /* InjectedScriptCanvasModule.cpp */,
AA73183D159255B900A93E6E /* InjectedScriptCanvasModule.h */,
AA9030FE157E16A000276247 /* InjectedScriptCanvasModuleSource.js */,
@@ -14814,8 +14781,6 @@
AAD766EA157E502F00E85423 /* InspectorCanvasInstrumentation.h */,
7A1F2B51126C61B20006A7E6 /* InspectorClient.cpp */,
1C81B9580E97330800266E07 /* InspectorClient.h */,
- F3335BF612E07DC300D33011 /* InspectorConsoleAgent.cpp */,
- F3335BF712E07DC300D33011 /* InspectorConsoleAgent.h */,
F3F5CF1012ED81A80084C569 /* InspectorConsoleInstrumentation.h */,
1C81B9570E97330800266E07 /* InspectorController.cpp */,
1C81B9560E97330800266E07 /* InspectorController.h */,
@@ -14894,16 +14859,12 @@
A584FE2E1864CB8400843B10 /* PageInjectedScriptManager.h */,
F382088C147D35F90010BC06 /* PageRuntimeAgent.cpp */,
F382088D147D35F90010BC06 /* PageRuntimeAgent.h */,
- F39BE95912673BF400E0A674 /* ScriptArguments.cpp */,
- F39BE95A12673BF400E0A674 /* ScriptArguments.h */,
- 416E75CA0EDF90C700360E1D /* ScriptCallFrame.cpp */,
- 416E75C90EDF90C700360E1D /* ScriptCallFrame.h */,
- 416E75BD0EDF8FD700360E1D /* ScriptCallStack.cpp */,
- 416E75BC0EDF8FD700360E1D /* ScriptCallStack.h */,
9FA37EEF1172FD4100C4CD55 /* ScriptProfile.idl */,
9FA37EF01172FD4100C4CD55 /* ScriptProfileNode.idl */,
7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */,
7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */,
+ A56C5B98189F34570082D13C /* WebConsoleAgent.cpp */,
+ A56C5B99189F34570082D13C /* WebConsoleAgent.h */,
A5E616711894581F009ADF50 /* WebDebuggerAgent.cpp */,
A5E616721894581F009ADF50 /* WebDebuggerAgent.h */,
F382088E147D35F90010BC06 /* WorkerConsoleAgent.cpp */,
@@ -16057,7 +16018,6 @@
BC0B36A10CD3C67C00AC7EB5 /* Console.cpp */,
BC0B36A20CD3C67C00AC7EB5 /* Console.h */,
BC0B36A30CD3C67C00AC7EB5 /* Console.idl */,
- BCE5644D137A34D6007D2934 /* ConsoleTypes.h */,
97C471D912F925BC0086354B /* ContentSecurityPolicy.cpp */,
97C471DA12F925BD0086354B /* ContentSecurityPolicy.h */,
065AD4F20B0C2EDA005A2B1D /* ContextMenuClient.h */,
@@ -20189,8 +20149,6 @@
BCA378BB0D15F64200B793D6 /* ScheduledAction.h */,
41F1D21E0EF35C2A00DA8753 /* ScriptCachedFrameData.cpp */,
41F1D21D0EF35C2A00DA8753 /* ScriptCachedFrameData.h */,
- F392249A126F11AE00A926D9 /* ScriptCallStackFactory.cpp */,
- F392249B126F11AE00A926D9 /* ScriptCallStackFactory.h */,
93B70D5309EB0C7C009D8468 /* ScriptController.cpp */,
93B70D5409EB0C7C009D8468 /* ScriptController.h */,
A83E1C720E49042B00140B9C /* ScriptControllerMac.mm */,
@@ -22889,10 +22847,7 @@
FD31608F12B026F700C1A359 /* Cone.h in Headers */,
65C97AF308EA908800ACD273 /* config.h in Headers */,
BC0B36A50CD3C67C00AC7EB5 /* Console.h in Headers */,
- 2DF2E9D5166E39750035BEF2 /* ConsoleAPITypes.h in Headers */,
- 41F0618E0F5F069800A07EAC /* ConsoleMessage.h in Headers */,
073AB4B317F8BACA006E0D6F /* AllVideoCapabilities.h in Headers */,
- BCE5644E137A34D6007D2934 /* ConsoleTypes.h in Headers */,
A818721C0977D3C0005826D9 /* ContainerNode.h in Headers */,
E1A1470811102B1500EEC0F3 /* ContainerNodeAlgorithms.h in Headers */,
078E091D17D14D1C00420AA1 /* NavigatorUserMediaSuccessCallback.h in Headers */,
@@ -23805,6 +23760,7 @@
93309DE6099E64920056E581 /* HTMLInterchange.h in Headers */,
A81369E4097374F600D74463 /* HTMLKeygenElement.h in Headers */,
A81369E2097374F600D74463 /* HTMLLabelElement.h in Headers */,
+ A56C5B9B189F34570082D13C /* WebConsoleAgent.h in Headers */,
A81369E0097374F600D74463 /* HTMLLegendElement.h in Headers */,
A8EA79F60A1916DF00A8EF5F /* HTMLLIElement.h in Headers */,
A871DC200A15205700B12A68 /* HTMLLinkElement.h in Headers */,
@@ -23889,7 +23845,6 @@
078E092117D14D1C00420AA1 /* RTCDTMFToneChangeEvent.h in Headers */,
07277E5117D018CC0015534D /* JSMediaStreamEvent.h in Headers */,
1A71D57C0F33819000F9CE4E /* IdentifierRep.h in Headers */,
- 5913A24213D49EBA00F5B05C /* IdentifiersFactory.h in Headers */,
49E911C50EF86D47009D0CAF /* IdentityTransformOperation.h in Headers */,
E125F856182C0F8300D84CD9 /* CryptoKeySerialization.h in Headers */,
A584FE2618637DAB00843B10 /* CommandLineAPIModuleSource.h in Headers */,
@@ -23942,7 +23897,6 @@
AAD766EC157E502F00E85423 /* InspectorCanvasAgent.h in Headers */,
AAD766ED157E502F00E85423 /* InspectorCanvasInstrumentation.h in Headers */,
1C81B95C0E97330800266E07 /* InspectorClient.h in Headers */,
- F3335BF912E07DC300D33011 /* InspectorConsoleAgent.h in Headers */,
F3F5CF1112ED81A80084C569 /* InspectorConsoleInstrumentation.h in Headers */,
1C81B95A0E97330800266E07 /* InspectorController.h in Headers */,
F325A40B14EE36FA007324E2 /* InspectorCounters.h in Headers */,
@@ -25130,11 +25084,7 @@
9BD0BF9312A42BF50072FD43 /* ScopedEventQueue.h in Headers */,
BCEC01BE0C274DAC009F4EC9 /* Screen.h in Headers */,
A84D82C111D3474800972990 /* ScriptableDocumentParser.h in Headers */,
- F39BE95C12673BF400E0A674 /* ScriptArguments.h in Headers */,
41F1D21F0EF35C2A00DA8753 /* ScriptCachedFrameData.h in Headers */,
- 416E75CB0EDF90C700360E1D /* ScriptCallFrame.h in Headers */,
- 416E75BE0EDF8FD700360E1D /* ScriptCallStack.h in Headers */,
- F392249D126F11AE00A926D9 /* ScriptCallStackFactory.h in Headers */,
93B70D7009EB0C7C009D8468 /* ScriptController.h in Headers */,
4998AED213FB224D0090B1AA /* ScriptedAnimationController.h in Headers */,
08A484780E5272C500C3FE76 /* ScriptElement.h in Headers */,
@@ -26498,7 +26448,6 @@
FD31608E12B026F700C1A359 /* Cone.cpp in Sources */,
3146FE6F184420AA001A937C /* OESTextureFloatLinear.cpp in Sources */,
BC0B36A40CD3C67C00AC7EB5 /* Console.cpp in Sources */,
- 41F0618F0F5F069800A07EAC /* ConsoleMessage.cpp in Sources */,
A818721F0977D3C0005826D9 /* ContainerNode.cpp in Sources */,
A7A78CD51532BA62006C21E4 /* ContainerNodeAlgorithms.cpp in Sources */,
BC5EB9800E82072500B25965 /* ContentData.cpp in Sources */,
@@ -27235,7 +27184,6 @@
C585A66211D4FAC5004C3E4B /* IDBBindingUtilities.cpp in Sources */,
1A71D57B0F33819000F9CE4E /* IdentifierRep.cpp in Sources */,
0705853117FDE6D9005F2BCB /* JSMediaTrackConstraint.cpp in Sources */,
- 5913A24113D49EBA00F5B05C /* IdentifiersFactory.cpp in Sources */,
C3CF17A415B0063F00276D39 /* IdTargetObserver.cpp in Sources */,
C3CF17A615B0063F00276D39 /* IdTargetObserverRegistry.cpp in Sources */,
B275356F0B053814002CE64F /* Image.cpp in Sources */,
@@ -27279,7 +27227,6 @@
E1F80B8A183172A2007885C3 /* JSCryptoKeyPairCustom.cpp in Sources */,
AAD766EB157E502F00E85423 /* InspectorCanvasAgent.cpp in Sources */,
7A1F2B52126C61B20006A7E6 /* InspectorClient.cpp in Sources */,
- F3335BF812E07DC300D33011 /* InspectorConsoleAgent.cpp in Sources */,
1C81B95B0E97330800266E07 /* InspectorController.cpp in Sources */,
F325A40A14EE36FA007324E2 /* InspectorCounters.cpp in Sources */,
82AB1743124B99EC00C5069D /* InspectorCSSAgent.cpp in Sources */,
@@ -28444,11 +28391,7 @@
9BD0BF9412A42BF50072FD43 /* ScopedEventQueue.cpp in Sources */,
BCEC01BD0C274DAC009F4EC9 /* Screen.cpp in Sources */,
A84D82C211D3474800972990 /* ScriptableDocumentParser.cpp in Sources */,
- F39BE95B12673BF400E0A674 /* ScriptArguments.cpp in Sources */,
41F1D2200EF35C2A00DA8753 /* ScriptCachedFrameData.cpp in Sources */,
- 416E75CC0EDF90C700360E1D /* ScriptCallFrame.cpp in Sources */,
- 416E75BF0EDF8FD700360E1D /* ScriptCallStack.cpp in Sources */,
- F392249C126F11AE00A926D9 /* ScriptCallStackFactory.cpp in Sources */,
93B70D6F09EB0C7C009D8468 /* ScriptController.cpp in Sources */,
A83E1C740E49042C00140B9C /* ScriptControllerMac.mm in Sources */,
4998AED113FB224D0090B1AA /* ScriptedAnimationController.cpp in Sources */,
@@ -28621,6 +28564,7 @@
31A795C81888BCB500382F90 /* ANGLEInstancedArrays.cpp in Sources */,
A5840E24187B8AC200843B10 /* PageInjectedScriptHost.cpp in Sources */,
A8C4A7FE09D563270003AC8D /* StyledElement.cpp in Sources */,
+ A56C5B9A189F34570082D13C /* WebConsoleAgent.cpp in Sources */,
BC5EB8B80E8201BD00B25965 /* StyleDeprecatedFlexibleBoxData.cpp in Sources */,
AA4C3A760B2B1679002334A2 /* InlineStyleSheetOwner.cpp in Sources */,
319AE063142D6B24006563A1 /* StyleFilterData.cpp in Sources */,
diff --git a/Source/WebCore/bindings/js/JSAudioContextCustom.cpp b/Source/WebCore/bindings/js/JSAudioContextCustom.cpp
index e195ddf..01968f0 100644
--- a/Source/WebCore/bindings/js/JSAudioContextCustom.cpp
+++ b/Source/WebCore/bindings/js/JSAudioContextCustom.cpp
@@ -73,8 +73,7 @@
#if ENABLE(LEGACY_WEB_AUDIO)
// Constructor for offline (render-target) AudioContext which renders into an AudioBuffer.
// new AudioContext(in unsigned long numberOfChannels, in unsigned long numberOfFrames, in float sampleRate);
- document.addConsoleMessage(JSMessageSource, WarningMessageLevel,
- "Deprecated AudioContext constructor: use OfflineAudioContext instead");
+ document.addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Deprecated AudioContext constructor: use OfflineAudioContext instead"));
if (exec->argumentCount() < 3)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
diff --git a/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp b/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
index 0428e83..72ec9ce 100644
--- a/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
+++ b/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
@@ -143,7 +143,6 @@
#include "PageScriptDebugServer.cpp"
#include "ScheduledAction.cpp"
#include "ScriptCachedFrameData.cpp"
-#include "ScriptCallStackFactory.cpp"
#include "ScriptController.cpp"
#include "ScriptProfiler.cpp"
#include "ScriptState.cpp"
diff --git a/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp b/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp
index f1b63f8..4c10e08 100644
--- a/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp
+++ b/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp
@@ -81,7 +81,7 @@
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())
- console->addMessage(JSMessageSource, ErrorMessageLevel, "XPathNSResolver does not have a lookupNamespaceURI method.");
+ console->addMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("XPathNSResolver does not have a lookupNamespaceURI method."));
return String();
}
function = m_customResolver.get();
diff --git a/Source/WebCore/bindings/js/JSDOMBinding.cpp b/Source/WebCore/bindings/js/JSDOMBinding.cpp
index 2621c67..58092ea 100644
--- a/Source/WebCore/bindings/js/JSDOMBinding.cpp
+++ b/Source/WebCore/bindings/js/JSDOMBinding.cpp
@@ -34,8 +34,8 @@
#include "JSDOMWindowCustom.h"
#include "JSExceptionBase.h"
#include "SecurityOrigin.h"
-#include "ScriptCallStack.h"
-#include "ScriptCallStackFactory.h"
+#include <inspector/ScriptCallStack.h>
+#include <inspector/ScriptCallStackFactory.h>
#include <interpreter/Interpreter.h>
#include <runtime/DateInstance.h>
#include <runtime/Error.h>
@@ -45,6 +45,7 @@
#include <wtf/MathExtras.h>
using namespace JSC;
+using namespace Inspector;
namespace WebCore {
diff --git a/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp b/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp
index 19a7800..c15bccb 100644
--- a/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp
+++ b/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp
@@ -150,7 +150,7 @@
return throwTypeError(exec);
if (!key->allows(CryptoKeyUsageEncrypt)) {
- m_impl->document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Key usages do not include 'encrypt'");
+ m_impl->document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'encrypt'"));
setDOMException(exec, NOT_SUPPORTED_ERR);
return jsUndefined();
}
@@ -202,7 +202,7 @@
return throwTypeError(exec);
if (!key->allows(CryptoKeyUsageDecrypt)) {
- m_impl->document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Key usages do not include 'decrypt'");
+ m_impl->document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'decrypt'"));
setDOMException(exec, NOT_SUPPORTED_ERR);
return jsUndefined();
}
@@ -253,7 +253,7 @@
return throwTypeError(exec);
if (!key->allows(CryptoKeyUsageSign)) {
- m_impl->document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Key usages do not include 'sign'");
+ m_impl->document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'sign'"));
setDOMException(exec, NOT_SUPPORTED_ERR);
return jsUndefined();
}
@@ -304,7 +304,7 @@
return throwTypeError(exec);
if (!key->allows(CryptoKeyUsageVerify)) {
- m_impl->document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Key usages do not include 'verify'");
+ m_impl->document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'verify'"));
setDOMException(exec, NOT_SUPPORTED_ERR);
return jsUndefined();
}
@@ -639,7 +639,7 @@
return throwTypeError(exec);
if (!wrappingKey->allows(CryptoKeyUsageWrapKey)) {
- m_impl->document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Key usages do not include 'wrapKey'");
+ m_impl->document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'wrapKey'"));
setDOMException(exec, NOT_SUPPORTED_ERR);
return jsUndefined();
}
@@ -718,7 +718,7 @@
return throwTypeError(exec);
if (!unwrappingKey->allows(CryptoKeyUsageUnwrapKey)) {
- m_impl->document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Key usages do not include 'unwrapKey'");
+ m_impl->document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'unwrapKey'"));
setDOMException(exec, NOT_SUPPORTED_ERR);
return jsUndefined();
}
diff --git a/Source/WebCore/bindings/js/ScriptCallStackFactory.cpp b/Source/WebCore/bindings/js/ScriptCallStackFactory.cpp
deleted file mode 100644
index 7d695a4..0000000
--- a/Source/WebCore/bindings/js/ScriptCallStackFactory.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright (c) 2010 Google Inc. All rights reserved.
- * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * 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.
- * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER 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 "ScriptCallStackFactory.h"
-
-#include "InspectorInstrumentation.h"
-#include "JSDOMBinding.h"
-#include "JSMainThreadExecState.h"
-#include "ScriptArguments.h"
-#include "ScriptCallFrame.h"
-#include "ScriptCallStack.h"
-#include <bindings/ScriptValue.h>
-#include <interpreter/CallFrame.h>
-#include <interpreter/CallFrameInlines.h>
-#include <interpreter/StackVisitor.h>
-#include <runtime/ArgList.h>
-#include <runtime/JSCJSValue.h>
-#include <runtime/JSFunction.h>
-#include <runtime/VM.h>
-#include <wtf/text/WTFString.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-class ScriptExecutionContext;
-
-class CreateScriptCallStackFunctor {
-public:
- CreateScriptCallStackFunctor(Vector<ScriptCallFrame>& frames, size_t remainingCapacity)
- : m_frames(frames)
- , m_remainingCapacityForFrameCapture(remainingCapacity)
- {
- }
-
- StackVisitor::Status operator()(StackVisitor& visitor)
- {
- if (m_remainingCapacityForFrameCapture) {
- unsigned line;
- unsigned column;
- visitor->computeLineAndColumn(line, column);
- m_frames.append(ScriptCallFrame(visitor->functionName(), visitor->sourceURL(), line, column));
-
- m_remainingCapacityForFrameCapture--;
- return StackVisitor::Continue;
- }
- return StackVisitor::Done;
- }
-
-private:
- Vector<ScriptCallFrame>& m_frames;
- size_t m_remainingCapacityForFrameCapture;
-};
-
-PassRefPtr<ScriptCallStack> createScriptCallStack(size_t maxStackSize, bool emptyIsAllowed)
-{
- Vector<ScriptCallFrame> frames;
- if (JSC::ExecState* exec = JSMainThreadExecState::currentState()) {
- CallFrame* frame = exec->vm().topCallFrame;
- CreateScriptCallStackFunctor functor(frames, maxStackSize);
- frame->iterate(functor);
- }
- if (frames.isEmpty() && !emptyIsAllowed) {
- // No frames found. It may happen in the case where
- // a bound function is called from native code for example.
- // Fallback to setting lineNumber to 0, and source and function name to "undefined".
- frames.append(ScriptCallFrame("undefined", "undefined", 0, 0));
- }
- return ScriptCallStack::create(frames);
-}
-
-class CreateScriptCallStackForConsoleFunctor {
-public:
- CreateScriptCallStackForConsoleFunctor(bool needToSkipAFrame, size_t remainingCapacity, Vector<ScriptCallFrame>& frames)
- : m_needToSkipAFrame(needToSkipAFrame)
- , m_remainingCapacityForFrameCapture(remainingCapacity)
- , m_frames(frames)
- {
- }
-
- StackVisitor::Status operator()(StackVisitor& visitor)
- {
- if (m_needToSkipAFrame) {
- m_needToSkipAFrame = false;
- return StackVisitor::Continue;
- }
-
- if (m_remainingCapacityForFrameCapture) {
- // This early exit is necessary to maintain our old behaviour
- // but the stack trace we produce now is complete and handles all
- // ways in which code may be running
- if (!visitor->callee() && m_frames.size())
- return StackVisitor::Done;
-
- unsigned line;
- unsigned column;
- visitor->computeLineAndColumn(line, column);
- m_frames.append(ScriptCallFrame(visitor->functionName(), visitor->sourceURL(), line, column));
-
- m_remainingCapacityForFrameCapture--;
- return StackVisitor::Continue;
- }
- return StackVisitor::Done;
- }
-
-private:
- bool m_needToSkipAFrame;
- size_t m_remainingCapacityForFrameCapture;
- Vector<ScriptCallFrame>& m_frames;
-};
-
-PassRefPtr<ScriptCallStack> createScriptCallStack(JSC::ExecState* exec, size_t maxStackSize)
-{
- Vector<ScriptCallFrame> frames;
- ASSERT(exec);
- CallFrame* frame = exec->vm().topCallFrame;
- CreateScriptCallStackForConsoleFunctor functor(true, maxStackSize, frames);
- frame->iterate(functor);
- if (frames.isEmpty()) {
- CreateScriptCallStackForConsoleFunctor functor(false, maxStackSize, frames);
- frame->iterate(functor);
- }
- return ScriptCallStack::create(frames);
-}
-
-PassRefPtr<ScriptCallStack> createScriptCallStackFromException(JSC::ExecState* exec, JSC::JSValue& exception, size_t maxStackSize)
-{
- Vector<ScriptCallFrame> frames;
- RefCountedArray<StackFrame> stackTrace = exec->vm().exceptionStack();
- for (size_t i = 0; i < stackTrace.size() && i < maxStackSize; i++) {
- if (!stackTrace[i].callee && frames.size())
- break;
-
- String functionName = stackTrace[i].friendlyFunctionName(exec);
- unsigned line;
- unsigned column;
- stackTrace[i].computeLineAndColumn(line, column);
- frames.append(ScriptCallFrame(functionName, stackTrace[i].sourceURL, line, column));
- }
-
- // FIXME: <http://webkit.org/b/115087> Web Inspector: WebCore::reportException should not evaluate JavaScript handling exceptions
- // Fallback to getting at least the line and sourceURL from the exception if it has values and the exceptionStack doesn't.
- if (frames.size() > 0) {
- const ScriptCallFrame& firstCallFrame = frames.first();
- JSObject* exceptionObject = exception.toObject(exec);
- if (exception.isObject() && firstCallFrame.sourceURL().isEmpty()) {
- JSValue lineValue = exceptionObject->getDirect(exec->vm(), Identifier(exec, "line"));
- int lineNumber = lineValue && lineValue.isNumber() ? int(lineValue.toNumber(exec)) : 0;
- JSValue columnValue = exceptionObject->getDirect(exec->vm(), Identifier(exec, "column"));
- int columnNumber = columnValue && columnValue.isNumber() ? int(columnValue.toNumber(exec)) : 0;
- JSValue sourceURLValue = exceptionObject->getDirect(exec->vm(), Identifier(exec, "sourceURL"));
- String exceptionSourceURL = sourceURLValue && sourceURLValue.isString() ? sourceURLValue.toString(exec)->value(exec) : ASCIILiteral("undefined");
- frames[0] = ScriptCallFrame(firstCallFrame.functionName(), exceptionSourceURL, lineNumber, columnNumber);
- }
- }
-
- return ScriptCallStack::create(frames);
-}
-
-PassRefPtr<ScriptCallStack> createScriptCallStackForConsole(JSC::ExecState* exec)
-{
- size_t maxStackSize = 1;
- if (InspectorInstrumentation::hasFrontends()) {
- ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
- if (InspectorInstrumentation::consoleAgentEnabled(scriptExecutionContext))
- maxStackSize = ScriptCallStack::maxCallStackSizeToCapture;
- }
- return createScriptCallStack(exec, maxStackSize);
-}
-
-PassRefPtr<ScriptArguments> createScriptArguments(JSC::ExecState* exec, unsigned skipArgumentCount)
-{
- Vector<Deprecated::ScriptValue> arguments;
- size_t argumentCount = exec->argumentCount();
- for (size_t i = skipArgumentCount; i < argumentCount; ++i)
- arguments.append(Deprecated::ScriptValue(exec->vm(), exec->uncheckedArgument(i)));
- return ScriptArguments::create(exec, arguments);
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/bindings/js/ScriptCallStackFactory.h b/Source/WebCore/bindings/js/ScriptCallStackFactory.h
deleted file mode 100644
index 298bbbd..0000000
--- a/Source/WebCore/bindings/js/ScriptCallStackFactory.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2010 Google 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:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * 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.
- * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER 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 ScriptCallStackFactory_h
-#define ScriptCallStackFactory_h
-
-#include <wtf/Forward.h>
-#include <wtf/RefCountedArray.h>
-
-namespace JSC {
-class ExecState;
-class JSValue;
-struct StackFrame;
-}
-
-namespace WebCore {
-
-class ScriptArguments;
-class ScriptCallStack;
-
-PassRefPtr<ScriptCallStack> createScriptCallStack(size_t maxStackSize, bool emptyStackIsAllowed);
-PassRefPtr<ScriptCallStack> createScriptCallStack(JSC::ExecState*, size_t maxStackSize);
-PassRefPtr<ScriptCallStack> createScriptCallStackFromException(JSC::ExecState*, JSC::JSValue& exception, size_t maxStackSize);
-PassRefPtr<ScriptCallStack> createScriptCallStackForConsole(JSC::ExecState*);
-PassRefPtr<ScriptArguments> createScriptArguments(JSC::ExecState*, unsigned skipArgumentCount);
-
-} // namespace WebCore
-
-#endif // ScriptCallStackFactory_h
diff --git a/Source/WebCore/bindings/js/ScriptController.cpp b/Source/WebCore/bindings/js/ScriptController.cpp
index bd58b82..dadeb3f 100644
--- a/Source/WebCore/bindings/js/ScriptController.cpp
+++ b/Source/WebCore/bindings/js/ScriptController.cpp
@@ -38,7 +38,6 @@
#include "Page.h"
#include "PageGroup.h"
#include "PluginView.h"
-#include "ScriptCallStack.h"
#include "ScriptSourceCode.h"
#include "ScriptableDocumentParser.h"
#include "Settings.h"
@@ -50,6 +49,7 @@
#include <bindings/ScriptValue.h>
#include <debugger/Debugger.h>
#include <heap/StrongInlines.h>
+#include <inspector/ScriptCallStack.h>
#include <runtime/InitializeThreading.h>
#include <runtime/JSLock.h>
#include <wtf/Threading.h>
@@ -482,7 +482,7 @@
if (m_frame.document() && m_frame.document()->isSandboxed(SandboxScripts)) {
// FIXME: This message should be moved off the console once a solution to https://bugs.webkit.org/show_bug.cgi?id=103274 exists.
if (reason == AboutToExecuteScript)
- m_frame.document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Blocked script execution in '" + m_frame.document()->url().stringCenterEllipsizedToLength() + "' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.");
+ m_frame.document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Blocked script execution in '" + m_frame.document()->url().stringCenterEllipsizedToLength() + "' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.");
return false;
}
diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
index a21416f40..e46c32b 100644
--- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -3059,9 +3059,9 @@
push(@callWithArgs, "scriptContext");
}
if ($function and $codeGenerator->ExtendedAttributeContains($callWith, "ScriptArguments")) {
- push(@$outputArray, " RefPtr<ScriptArguments> scriptArguments(createScriptArguments(exec, " . @{$function->parameters} . "));\n");
- $implIncludes{"ScriptArguments.h"} = 1;
- $implIncludes{"ScriptCallStackFactory.h"} = 1;
+ push(@$outputArray, " RefPtr<Inspector::ScriptArguments> scriptArguments(Inspector::createScriptArguments(exec, " . @{$function->parameters} . "));\n");
+ $implIncludes{"<inspector/ScriptArguments.h>"} = 1;
+ $implIncludes{"<inspector/ScriptCallStackFactory.h>"} = 1;
push(@callWithArgs, "scriptArguments.release()");
}
return @callWithArgs;
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
index 2ea73be..e373ff9 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
@@ -44,14 +44,14 @@
#include "SVGDocument.h"
#include "SVGPoint.h"
#include "SVGStaticPropertyTearOff.h"
-#include "ScriptArguments.h"
-#include "ScriptCallStackFactory.h"
#include "ScriptProfile.h"
#include "SerializedScriptValue.h"
#include "Settings.h"
#include "TestObj.h"
#include "URL.h"
#include "bool.h"
+#include <inspector/ScriptArguments.h>
+#include <inspector/ScriptCallStackFactory.h>
#include <runtime/Error.h>
#include <runtime/JSArray.h>
#include <runtime/JSString.h>
diff --git a/Source/WebCore/css/CSSParser.cpp b/Source/WebCore/css/CSSParser.cpp
index 1c6d24c..d21c43e 100644
--- a/Source/WebCore/css/CSSParser.cpp
+++ b/Source/WebCore/css/CSSParser.cpp
@@ -11476,7 +11476,7 @@
{
// FIXME: <http://webkit.org/b/114313> CSS parser console message errors should include column numbers.
PageConsole& console = m_styleSheet->singleOwnerDocument()->page()->console();
- console.addMessage(CSSMessageSource, WarningMessageLevel, message, m_styleSheet->baseURL().string(), lineNumber + 1, 0);
+ console.addMessage(MessageSource::CSS, MessageLevel::Warning, message, m_styleSheet->baseURL().string(), lineNumber + 1, 0);
}
PassRefPtr<StyleRuleKeyframes> CSSParser::createKeyframesRule(const String& name, PassOwnPtr<Vector<RefPtr<StyleKeyframe>>> popKeyframes)
diff --git a/Source/WebCore/css/MediaList.cpp b/Source/WebCore/css/MediaList.cpp
index 2320ff6..f00014f 100644
--- a/Source/WebCore/css/MediaList.cpp
+++ b/Source/WebCore/css/MediaList.cpp
@@ -310,7 +310,7 @@
message.append(serializedExpression);
- document->addConsoleMessage(CSSMessageSource, DebugMessageLevel, message);
+ document->addConsoleMessage(MessageSource::CSS, MessageLevel::Debug, message);
}
void reportMediaQueryWarningIfNeeded(Document* document, const MediaQuerySet* mediaQuerySet)
diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp
index 5c24c2d..8db300b 100644
--- a/Source/WebCore/dom/Document.cpp
+++ b/Source/WebCore/dom/Document.cpp
@@ -60,9 +60,6 @@
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "FrameView.h"
-#include "HashChangeEvent.h"
-#include "HistogramSupport.h"
-#include "History.h"
#include "HTMLAllCollection.h"
#include "HTMLAnchorElement.h"
#include "HTMLBaseElement.h"
@@ -86,6 +83,9 @@
#include "HTMLStyleElement.h"
#include "HTMLTitleElement.h"
#include "HTTPParsers.h"
+#include "HashChangeEvent.h"
+#include "HistogramSupport.h"
+#include "History.h"
#include "HitTestResult.h"
#include "IconController.h"
#include "ImageLoader.h"
@@ -126,7 +126,6 @@
#include "SVGSVGElement.h"
#include "SchemeRegistry.h"
#include "ScopedEventQueue.h"
-#include "ScriptCallStack.h"
#include "ScriptController.h"
#include "ScriptRunner.h"
#include "ScriptSourceCode.h"
@@ -153,6 +152,7 @@
#include "XPathNSResolver.h"
#include "XPathResult.h"
#include "htmlediting.h"
+#include <inspector/ScriptCallStack.h>
#include <wtf/CurrentTime.h>
#include <wtf/TemporaryChange.h>
#include <wtf/text/StringBuffer.h>
@@ -2560,9 +2560,9 @@
return m_domWindow.get();
}
-void Document::logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack> callStack)
+void Document::logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<Inspector::ScriptCallStack> callStack)
{
- addMessage(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, columnNumber, callStack);
+ addMessage(MessageSource::JS, MessageLevel::Error, errorMessage, sourceURL, lineNumber, columnNumber, callStack);
}
void Document::setURL(const URL& url)
@@ -2821,7 +2821,7 @@
// intent, we must navigate away from the possibly partially-rendered document to a location that
// doesn't inherit the parent's SecurityOrigin.
frame->navigationScheduler().scheduleLocationChange(securityOrigin(), SecurityOrigin::urlWithUniqueSecurityOrigin(), String());
- addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message, requestIdentifier);
+ addConsoleMessage(MessageSource::Security, MessageLevel::Error, message, requestIdentifier);
}
}
} else if (equalIgnoringCase(equiv, "content-security-policy"))
@@ -4781,7 +4781,7 @@
page->console().addMessage(source, level, message, requestIdentifier, this);
}
-void Document::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, JSC::ExecState* state, unsigned long requestIdentifier)
+void Document::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<Inspector::ScriptCallStack> callStack, JSC::ExecState* state, unsigned long requestIdentifier)
{
if (!isContextThread()) {
postTask(AddConsoleMessageTask::create(source, level, message));
diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h
index 4864351..90597af 100644
--- a/Source/WebCore/dom/Document.h
+++ b/Source/WebCore/dom/Document.h
@@ -1140,7 +1140,7 @@
#endif
virtual EventTarget* errorEventTarget() override;
- virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) override;
+ virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<Inspector::ScriptCallStack>) override;
void initDNSPrefetch();
@@ -1262,7 +1262,7 @@
virtual void refScriptExecutionContext() override { ref(); }
virtual void derefScriptExecutionContext() override { deref(); }
- virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, JSC::ExecState* = 0, unsigned long requestIdentifier = 0) override;
+ virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<Inspector::ScriptCallStack>, JSC::ExecState* = 0, unsigned long requestIdentifier = 0) override;
virtual double minimumTimerInterval() const override;
diff --git a/Source/WebCore/dom/ScriptElement.cpp b/Source/WebCore/dom/ScriptElement.cpp
index 452b71d..fce4f50 100644
--- a/Source/WebCore/dom/ScriptElement.cpp
+++ b/Source/WebCore/dom/ScriptElement.cpp
@@ -24,9 +24,9 @@
#include "config.h"
#include "ScriptElement.h"
-#include "CachedScript.h"
#include "CachedResourceLoader.h"
#include "CachedResourceRequest.h"
+#include "CachedScript.h"
#include "ContentSecurityPolicy.h"
#include "CrossOriginAccessControl.h"
#include "CurrentScriptIncrementer.h"
@@ -40,7 +40,6 @@
#include "Page.h"
#include "SVGNames.h"
#include "SVGScriptElement.h"
-#include "ScriptCallStack.h"
#include "ScriptController.h"
#include "ScriptRunner.h"
#include "ScriptSourceCode.h"
@@ -49,6 +48,7 @@
#include "Settings.h"
#include "TextNodeTraversal.h"
#include <bindings/ScriptValue.h>
+#include <inspector/ScriptCallStack.h>
#include <wtf/StdLibExtras.h>
#include <wtf/text/StringBuilder.h>
#include <wtf/text/StringHash.h>
@@ -291,7 +291,7 @@
#if ENABLE(NOSNIFF)
if (m_isExternalScript && m_cachedScript && !m_cachedScript->mimeTypeAllowedByNosniff()) {
- m_element->document().addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Refused to execute script from '" + m_cachedScript->url().stringCenterEllipsizedToLength() + "' because its MIME type ('" + m_cachedScript->mimeType() + "') is not executable, and strict MIME type checking is enabled.");
+ m_element->document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Refused to execute script from '" + m_cachedScript->url().stringCenterEllipsizedToLength() + "' because its MIME type ('" + m_cachedScript->mimeType() + "') is not executable, and strict MIME type checking is enabled.");
return;
}
#endif
@@ -348,7 +348,7 @@
dispatchErrorEvent();
DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Cross-origin script load denied by Cross-Origin Resource Sharing policy.")));
- m_element->document().addConsoleMessage(JSMessageSource, ErrorMessageLevel, consoleMessage);
+ m_element->document().addConsoleMessage(MessageSource::JS, MessageLevel::Error, consoleMessage);
return;
}
diff --git a/Source/WebCore/dom/ScriptExecutionContext.cpp b/Source/WebCore/dom/ScriptExecutionContext.cpp
index ca6041f..3665235d 100644
--- a/Source/WebCore/dom/ScriptExecutionContext.cpp
+++ b/Source/WebCore/dom/ScriptExecutionContext.cpp
@@ -33,10 +33,10 @@
#include "ErrorEvent.h"
#include "MessagePort.h"
#include "PublicURLManager.h"
-#include "ScriptCallStack.h"
#include "Settings.h"
#include "WorkerGlobalScope.h"
#include "WorkerThread.h"
+#include <inspector/ScriptCallStack.h>
#include <wtf/MainThread.h>
#include <wtf/Ref.h>
@@ -51,6 +51,8 @@
#include "DatabaseContext.h"
#endif
+using namespace Inspector;
+
namespace WebCore {
class ProcessMessagesSoonTask : public ScriptExecutionContext::Task {
diff --git a/Source/WebCore/dom/ScriptExecutionContext.h b/Source/WebCore/dom/ScriptExecutionContext.h
index 1c7f0da..b5bf80a 100644
--- a/Source/WebCore/dom/ScriptExecutionContext.h
+++ b/Source/WebCore/dom/ScriptExecutionContext.h
@@ -29,10 +29,10 @@
#define ScriptExecutionContext_h
#include "ActiveDOMObject.h"
-#include "ConsoleTypes.h"
-#include "URL.h"
#include "SecurityContext.h"
#include "Supplementable.h"
+#include "URL.h"
+#include <inspector/ConsoleTypes.h>
#include <wtf/HashSet.h>
namespace JSC {
@@ -40,6 +40,10 @@
class VM;
}
+namespace Inspector {
+class ScriptCallStack;
+}
+
namespace WebCore {
class CachedScript;
@@ -49,7 +53,6 @@
class EventQueue;
class EventTarget;
class MessagePort;
-class ScriptCallStack;
#if ENABLE(BLOB)
class PublicURLManager;
@@ -75,7 +78,7 @@
bool sanitizeScriptError(String& errorMessage, int& lineNumber, int& columnNumber, String& sourceURL, CachedScript* = 0);
// FIXME: <http://webkit.org/b/114315> ScriptExecutionContext log exception should include a column number
- void reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>, CachedScript* = 0);
+ void reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, PassRefPtr<Inspector::ScriptCallStack>, CachedScript* = 0);
void addConsoleMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
virtual void addConsoleMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0) = 0;
@@ -177,9 +180,9 @@
ActiveDOMObject::ReasonForSuspension reasonForSuspendingActiveDOMObjects() const { return m_reasonForSuspendingActiveDOMObjects; }
private:
- virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, JSC::ExecState* = 0, unsigned long requestIdentifier = 0) = 0;
+ virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<Inspector::ScriptCallStack>, JSC::ExecState* = 0, unsigned long requestIdentifier = 0) = 0;
virtual EventTarget* errorEventTarget() = 0;
- virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) = 0;
+ virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<Inspector::ScriptCallStack>) = 0;
bool dispatchErrorEvent(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, CachedScript*);
void closeMessagePorts();
diff --git a/Source/WebCore/dom/ViewportArguments.cpp b/Source/WebCore/dom/ViewportArguments.cpp
index 2c9539d..0f6c083 100644
--- a/Source/WebCore/dom/ViewportArguments.cpp
+++ b/Source/WebCore/dom/ViewportArguments.cpp
@@ -448,15 +448,15 @@
{
switch (errorCode) {
case TruncatedViewportArgumentValueError:
- return WarningMessageLevel;
+ return MessageLevel::Warning;
case UnrecognizedViewportArgumentKeyError:
case UnrecognizedViewportArgumentValueError:
case MaximumScaleTooLargeError:
- return ErrorMessageLevel;
+ return MessageLevel::Error;
}
ASSERT_NOT_REACHED();
- return ErrorMessageLevel;
+ return MessageLevel::Error;
}
void reportViewportWarning(Document* document, ViewportErrorCode errorCode, const String& replacement1, const String& replacement2)
@@ -475,7 +475,7 @@
message.append(" Note that ';' is not a separator in viewport values. The list should be comma-separated.");
// FIXME: This message should be moved off the console once a solution to https://bugs.webkit.org/show_bug.cgi?id=103274 exists.
- document->addConsoleMessage(RenderingMessageSource, viewportErrorMessageLevel(errorCode), message);
+ document->addConsoleMessage(MessageSource::Rendering, viewportErrorMessageLevel(errorCode), message);
}
} // namespace WebCore
diff --git a/Source/WebCore/fileapi/Blob.cpp b/Source/WebCore/fileapi/Blob.cpp
index 6726bf4..6341d13 100644
--- a/Source/WebCore/fileapi/Blob.cpp
+++ b/Source/WebCore/fileapi/Blob.cpp
@@ -34,7 +34,6 @@
#include "BlobURL.h"
#include "File.h"
#include "HistogramSupport.h"
-#include "ScriptCallStack.h"
#include "ScriptExecutionContext.h"
#include "ThreadableBlobRegistry.h"
#include <wtf/text/CString.h>
diff --git a/Source/WebCore/fileapi/WebKitBlobBuilder.cpp b/Source/WebCore/fileapi/WebKitBlobBuilder.cpp
index c47eb1f..8a45805 100644
--- a/Source/WebCore/fileapi/WebKitBlobBuilder.cpp
+++ b/Source/WebCore/fileapi/WebKitBlobBuilder.cpp
@@ -29,7 +29,6 @@
*/
#include "config.h"
-
#include "WebKitBlobBuilder.h"
#include "Blob.h"
@@ -38,7 +37,6 @@
#include "File.h"
#include "HistogramSupport.h"
#include "LineEnding.h"
-#include "ScriptCallStack.h"
#include "TextEncoding.h"
#include <runtime/ArrayBuffer.h>
#include <runtime/ArrayBufferView.h>
diff --git a/Source/WebCore/html/HTMLFormControlElement.cpp b/Source/WebCore/html/HTMLFormControlElement.cpp
index e610229..638813d 100644
--- a/Source/WebCore/html/HTMLFormControlElement.cpp
+++ b/Source/WebCore/html/HTMLFormControlElement.cpp
@@ -180,7 +180,7 @@
return false;
if (element->document().isSandboxed(SandboxAutomaticFeatures)) {
// FIXME: This message should be moved off the console once a solution to https://bugs.webkit.org/show_bug.cgi?id=103274 exists.
- element->document().addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Blocked autofocusing on a form control because the form's frame is sandboxed and the 'allow-scripts' permission is not set.");
+ element->document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, ASCIILiteral("Blocked autofocusing on a form control because the form's frame is sandboxed and the 'allow-scripts' permission is not set."));
return false;
}
if (element->hasAutofocused())
diff --git a/Source/WebCore/html/HTMLFormElement.cpp b/Source/WebCore/html/HTMLFormElement.cpp
index 132ed91..60a1387 100644
--- a/Source/WebCore/html/HTMLFormElement.cpp
+++ b/Source/WebCore/html/HTMLFormElement.cpp
@@ -253,7 +253,7 @@
continue;
String message("An invalid form control with name='%name' is not focusable.");
message.replace("%name", control.name());
- document().addConsoleMessage(RenderingMessageSource, ErrorMessageLevel, message);
+ document().addConsoleMessage(MessageSource::Rendering, MessageLevel::Error, message);
}
}
diff --git a/Source/WebCore/html/HTMLIFrameElement.cpp b/Source/WebCore/html/HTMLIFrameElement.cpp
index a87e039..d3eba40 100644
--- a/Source/WebCore/html/HTMLIFrameElement.cpp
+++ b/Source/WebCore/html/HTMLIFrameElement.cpp
@@ -80,7 +80,7 @@
String invalidTokens;
setSandboxFlags(value.isNull() ? SandboxNone : SecurityContext::parseSandboxPolicy(value, invalidTokens));
if (!invalidTokens.isNull())
- document().addConsoleMessage(OtherMessageSource, ErrorMessageLevel, "Error while parsing the 'sandbox' attribute: " + invalidTokens);
+ document().addConsoleMessage(MessageSource::Other, MessageLevel::Error, "Error while parsing the 'sandbox' attribute: " + invalidTokens);
} else
HTMLFrameElementBase::parseAttribute(name, value);
}
diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp
index bde2ba5..527cd13 100644
--- a/Source/WebCore/html/HTMLMediaElement.cpp
+++ b/Source/WebCore/html/HTMLMediaElement.cpp
@@ -2747,7 +2747,7 @@
#if ENABLE(ENCRYPTED_MEDIA_V2)
static bool firstTime = true;
if (firstTime && scriptExecutionContext()) {
- scriptExecutionContext()->addConsoleMessage(JSMessageSource, WarningMessageLevel, "'HTMLMediaElement.webkitGenerateKeyRequest()' is deprecated. Use 'MediaKeys.createSession()' instead.");
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("'HTMLMediaElement.webkitGenerateKeyRequest()' is deprecated. Use 'MediaKeys.createSession()' instead."));
firstTime = false;
}
#endif
@@ -2783,7 +2783,7 @@
#if ENABLE(ENCRYPTED_MEDIA_V2)
static bool firstTime = true;
if (firstTime && scriptExecutionContext()) {
- scriptExecutionContext()->addConsoleMessage(JSMessageSource, WarningMessageLevel, "'HTMLMediaElement.webkitAddKey()' is deprecated. Use 'MediaKeySession.update()' instead.");
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("'HTMLMediaElement.webkitAddKey()' is deprecated. Use 'MediaKeySession.update()' instead."));
firstTime = false;
}
#endif
diff --git a/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index 0d7b69e..1655a7b 100755
--- a/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -1859,7 +1859,7 @@
{
if (!canvas()->originClean()) {
DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Unable to get image data from canvas because the canvas has been tainted by cross-origin data.")));
- canvas()->document().addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, consoleMessage);
+ canvas()->document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, consoleMessage);
ec = SECURITY_ERR;
return 0;
}
diff --git a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp b/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
index 3810399..a7fefb9 100644
--- a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
+++ b/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
@@ -5528,7 +5528,7 @@
{
if (!canvas())
return;
- canvas()->document().addConsoleMessage(RenderingMessageSource, WarningMessageLevel, message);
+ canvas()->document().addConsoleMessage(MessageSource::Rendering, MessageLevel::Warning, message);
}
bool WebGLRenderingContext::validateFramebufferFuncParameters(const char* functionName, GC3Denum target, GC3Denum attachment)
diff --git a/Source/WebCore/html/parser/XSSAuditor.cpp b/Source/WebCore/html/parser/XSSAuditor.cpp
index 084fa78..b3635b9 100644
--- a/Source/WebCore/html/parser/XSSAuditor.cpp
+++ b/Source/WebCore/html/parser/XSSAuditor.cpp
@@ -280,7 +280,7 @@
}
}
if (xssProtectionHeader == ContentSecurityPolicy::ReflectedXSSInvalid)
- document->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Error parsing header X-XSS-Protection: " + headerValue + ": " + errorDetails + " at character position " + String::format("%u", errorPosition) + ". The default protections will be applied.");
+ document->addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Error parsing header X-XSS-Protection: " + headerValue + ": " + errorDetails + " at character position " + String::format("%u", errorPosition) + ". The default protections will be applied.");
ContentSecurityPolicy::ReflectedXSSDisposition cspHeader = document->contentSecurityPolicy()->reflectedXSSDisposition();
m_didSendValidCSPHeader = cspHeader != ContentSecurityPolicy::ReflectedXSSUnset && cspHeader != ContentSecurityPolicy::ReflectedXSSInvalid;
diff --git a/Source/WebCore/html/parser/XSSAuditorDelegate.cpp b/Source/WebCore/html/parser/XSSAuditorDelegate.cpp
index d06069b..9cba069 100644
--- a/Source/WebCore/html/parser/XSSAuditorDelegate.cpp
+++ b/Source/WebCore/html/parser/XSSAuditorDelegate.cpp
@@ -98,7 +98,7 @@
{
ASSERT(isMainThread());
- m_document.addConsoleMessage(JSMessageSource, ErrorMessageLevel, buildConsoleError(xssInfo, m_document.url().string()));
+ m_document.addConsoleMessage(MessageSource::JS, MessageLevel::Error, buildConsoleError(xssInfo, m_document.url().string()));
FrameLoader& frameLoader = m_document.frame()->loader();
if (xssInfo.m_didBlockEntirePage)
diff --git a/Source/WebCore/inspector/CommandLineAPIHost.cpp b/Source/WebCore/inspector/CommandLineAPIHost.cpp
index 92f1d27..f404a52 100644
--- a/Source/WebCore/inspector/CommandLineAPIHost.cpp
+++ b/Source/WebCore/inspector/CommandLineAPIHost.cpp
@@ -38,7 +38,6 @@
#include "FrameLoader.h"
#include "HTMLFrameOwnerElement.h"
#include "InspectorClient.h"
-#include "InspectorConsoleAgent.h"
#include "InspectorDOMAgent.h"
#include "InspectorDOMStorageAgent.h"
#include "InspectorDatabaseAgent.h"
@@ -49,6 +48,7 @@
#include <bindings/ScriptValue.h>
#include <inspector/InspectorValues.h>
#include <inspector/agents/InspectorAgent.h>
+#include <inspector/agents/InspectorConsoleAgent.h>
#include <wtf/RefPtr.h>
#include <wtf/StdLibExtras.h>
diff --git a/Source/WebCore/inspector/CommandLineAPIHost.h b/Source/WebCore/inspector/CommandLineAPIHost.h
index 6f9025f..08f0c15 100644
--- a/Source/WebCore/inspector/CommandLineAPIHost.h
+++ b/Source/WebCore/inspector/CommandLineAPIHost.h
@@ -30,8 +30,8 @@
#ifndef CommandLineAPIHost_h
#define CommandLineAPIHost_h
-#include "ConsoleTypes.h"
#include "ScriptState.h"
+#include <inspector/ConsoleTypes.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
@@ -42,6 +42,7 @@
namespace Inspector {
class InspectorAgent;
+class InspectorConsoleAgent;
class InspectorObject;
class InspectorValue;
}
@@ -49,7 +50,6 @@
namespace WebCore {
class Database;
-class InspectorConsoleAgent;
class InspectorDOMAgent;
class InspectorDOMStorageAgent;
class InspectorDatabaseAgent;
@@ -64,11 +64,11 @@
~CommandLineAPIHost();
void init(Inspector::InspectorAgent* inspectorAgent
- , InspectorConsoleAgent* consoleAgent
- , InspectorDOMAgent* domAgent
- , InspectorDOMStorageAgent* domStorageAgent
+ , Inspector::InspectorConsoleAgent* consoleAgent
+ , InspectorDOMAgent* domAgent
+ , InspectorDOMStorageAgent* domStorageAgent
#if ENABLE(SQL_DATABASE)
- , InspectorDatabaseAgent* databaseAgent
+ , InspectorDatabaseAgent* databaseAgent
#endif
)
{
@@ -108,7 +108,7 @@
CommandLineAPIHost();
Inspector::InspectorAgent* m_inspectorAgent;
- InspectorConsoleAgent* m_consoleAgent;
+ Inspector::InspectorConsoleAgent* m_consoleAgent;
InspectorDOMAgent* m_domAgent;
InspectorDOMStorageAgent* m_domStorageAgent;
#if ENABLE(SQL_DATABASE)
diff --git a/Source/WebCore/inspector/ConsoleAPITypes.h b/Source/WebCore/inspector/ConsoleAPITypes.h
deleted file mode 100644
index 11f65ec..0000000
--- a/Source/WebCore/inspector/ConsoleAPITypes.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2012 Google 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. 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 INC. 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 ConsoleAPITypes_h
-#define ConsoleAPITypes_h
-
-namespace WebCore {
-
-enum MessageType {
- LogMessageType,
- DirMessageType,
- DirXMLMessageType,
- TableMessageType,
- TraceMessageType,
- StartGroupMessageType,
- StartGroupCollapsedMessageType,
- EndGroupMessageType,
- ClearMessageType,
- AssertMessageType,
- TimingMessageType,
- ProfileMessageType,
- ProfileEndMessageType
-};
-
-} // namespace WebCore
-
-#endif // ConsoleAPITypes_h
diff --git a/Source/WebCore/inspector/ConsoleMessage.cpp b/Source/WebCore/inspector/ConsoleMessage.cpp
deleted file mode 100644
index d3b93ac..0000000
--- a/Source/WebCore/inspector/ConsoleMessage.cpp
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
- * Copyright (C) 2009, 2010 Google 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 Computer, 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 "ConsoleMessage.h"
-
-#if ENABLE(INSPECTOR)
-
-#include "Console.h"
-#include "IdentifiersFactory.h"
-#include "ScriptArguments.h"
-#include "ScriptCallFrame.h"
-#include "ScriptCallStack.h"
-#include "ScriptCallStackFactory.h"
-#include <bindings/ScriptValue.h>
-#include <inspector/InjectedScript.h>
-#include <inspector/InjectedScriptManager.h>
-#include <inspector/InspectorValues.h>
-#include <wtf/MainThread.h>
-
-using namespace Inspector;
-
-namespace WebCore {
-
-ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned long requestIdentifier)
- : m_source(source)
- , m_type(type)
- , m_level(level)
- , m_message(message)
- , m_url()
- , m_line(0)
- , m_column(0)
- , m_repeatCount(1)
- , m_requestId(IdentifiersFactory::requestId(requestIdentifier))
-{
- autogenerateMetadata(canGenerateCallStack);
-}
-
-ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& url, unsigned line, unsigned column, JSC::ExecState* state, unsigned long requestIdentifier)
- : m_source(source)
- , m_type(type)
- , m_level(level)
- , m_message(message)
- , m_url(url)
- , m_line(line)
- , m_column(column)
- , m_repeatCount(1)
- , m_requestId(IdentifiersFactory::requestId(requestIdentifier))
-{
- autogenerateMetadata(canGenerateCallStack, state);
-}
-
-ConsoleMessage::ConsoleMessage(bool, MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtr<ScriptCallStack> callStack, unsigned long requestIdentifier)
- : m_source(source)
- , m_type(type)
- , m_level(level)
- , m_message(message)
- , m_arguments(nullptr)
- , m_line(0)
- , m_column(0)
- , m_repeatCount(1)
- , m_requestId(IdentifiersFactory::requestId(requestIdentifier))
-{
- if (callStack && callStack->size()) {
- const ScriptCallFrame& frame = callStack->at(0);
- m_url = frame.sourceURL();
- m_line = frame.lineNumber();
- m_column = frame.columnNumber();
- }
- m_callStack = callStack;
-}
-
-ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtr<ScriptArguments> arguments, JSC::ExecState* state, unsigned long requestIdentifier)
- : m_source(source)
- , m_type(type)
- , m_level(level)
- , m_message(message)
- , m_arguments(arguments)
- , m_url()
- , m_line(0)
- , m_column(0)
- , m_repeatCount(1)
- , m_requestId(IdentifiersFactory::requestId(requestIdentifier))
-{
- autogenerateMetadata(canGenerateCallStack, state);
-}
-
-ConsoleMessage::~ConsoleMessage()
-{
-}
-
-void ConsoleMessage::autogenerateMetadata(bool canGenerateCallStack, JSC::ExecState* state)
-{
- if (m_type == EndGroupMessageType)
- return;
-
- if (state)
- m_callStack = createScriptCallStackForConsole(state);
- else if (canGenerateCallStack)
- m_callStack = createScriptCallStack(ScriptCallStack::maxCallStackSizeToCapture, true);
- else
- return;
-
- if (m_callStack && m_callStack->size()) {
- const ScriptCallFrame& frame = m_callStack->at(0);
- m_url = frame.sourceURL();
- m_line = frame.lineNumber();
- m_column = frame.columnNumber();
- return;
- }
-
- m_callStack.clear();
-}
-
-// Keep in sync with inspector/front-end/ConsoleView.js
-static Inspector::TypeBuilder::Console::ConsoleMessage::Source::Enum messageSourceValue(MessageSource source)
-{
- switch (source) {
- case XMLMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::XML;
- case JSMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Javascript;
- case NetworkMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Network;
- case ConsoleAPIMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::ConsoleAPI;
- case StorageMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Storage;
- case AppCacheMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Appcache;
- case RenderingMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Rendering;
- case CSSMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::CSS;
- case SecurityMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Security;
- case OtherMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Other;
- }
- return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Other;
-}
-
-static Inspector::TypeBuilder::Console::ConsoleMessage::Type::Enum messageTypeValue(MessageType type)
-{
- switch (type) {
- case LogMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Log;
- case ClearMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Clear;
- case DirMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Dir;
- case DirXMLMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::DirXML;
- case TableMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Table;
- case TraceMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Trace;
- case StartGroupMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::StartGroup;
- case StartGroupCollapsedMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::StartGroupCollapsed;
- case EndGroupMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::EndGroup;
- case AssertMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Assert;
- case TimingMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Timing;
- case ProfileMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Profile;
- case ProfileEndMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::ProfileEnd;
- }
- return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Log;
-}
-
-static Inspector::TypeBuilder::Console::ConsoleMessage::Level::Enum messageLevelValue(MessageLevel level)
-{
- switch (level) {
- case DebugMessageLevel: return Inspector::TypeBuilder::Console::ConsoleMessage::Level::Debug;
- case LogMessageLevel: return Inspector::TypeBuilder::Console::ConsoleMessage::Level::Log;
- case WarningMessageLevel: return Inspector::TypeBuilder::Console::ConsoleMessage::Level::Warning;
- case ErrorMessageLevel: return Inspector::TypeBuilder::Console::ConsoleMessage::Level::Error;
- }
- return Inspector::TypeBuilder::Console::ConsoleMessage::Level::Log;
-}
-
-void ConsoleMessage::addToFrontend(InspectorConsoleFrontendDispatcher* consoleFrontendDispatcher, Inspector::InjectedScriptManager* injectedScriptManager, bool generatePreview)
-{
- RefPtr<Inspector::TypeBuilder::Console::ConsoleMessage> jsonObj = Inspector::TypeBuilder::Console::ConsoleMessage::create()
- .setSource(messageSourceValue(m_source))
- .setLevel(messageLevelValue(m_level))
- .setText(m_message);
- // FIXME: only send out type for ConsoleAPI source messages.
- jsonObj->setType(messageTypeValue(m_type));
- jsonObj->setLine(static_cast<int>(m_line));
- jsonObj->setColumn(static_cast<int>(m_column));
- jsonObj->setUrl(m_url);
- jsonObj->setRepeatCount(static_cast<int>(m_repeatCount));
- if (m_source == NetworkMessageSource && !m_requestId.isEmpty())
- jsonObj->setNetworkRequestId(m_requestId);
- if (m_arguments && m_arguments->argumentCount()) {
- InjectedScript injectedScript = injectedScriptManager->injectedScriptFor(m_arguments->globalState());
- if (!injectedScript.hasNoValue()) {
- RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::RemoteObject>> jsonArgs = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::RemoteObject>::create();
- if (m_type == TableMessageType && generatePreview && m_arguments->argumentCount()) {
- Deprecated::ScriptValue table = m_arguments->argumentAt(0);
- Deprecated::ScriptValue columns = m_arguments->argumentCount() > 1 ? m_arguments->argumentAt(1) : Deprecated::ScriptValue();
- RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> inspectorValue = injectedScript.wrapTable(table, columns);
- if (!inspectorValue) {
- ASSERT_NOT_REACHED();
- return;
- }
- jsonArgs->addItem(inspectorValue);
- } else {
- for (unsigned i = 0; i < m_arguments->argumentCount(); ++i) {
- RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> inspectorValue = injectedScript.wrapObject(m_arguments->argumentAt(i), "console", generatePreview);
- if (!inspectorValue) {
- ASSERT_NOT_REACHED();
- return;
- }
- jsonArgs->addItem(inspectorValue);
- }
- }
- jsonObj->setParameters(jsonArgs);
- }
- }
- if (m_callStack)
- jsonObj->setStackTrace(m_callStack->buildInspectorArray());
- consoleFrontendDispatcher->messageAdded(jsonObj);
-}
-
-void ConsoleMessage::updateRepeatCountInConsole(InspectorConsoleFrontendDispatcher* consoleFrontendDispatcher)
-{
- consoleFrontendDispatcher->messageRepeatCountUpdated(m_repeatCount);
-}
-
-bool ConsoleMessage::isEqual(ConsoleMessage* msg) const
-{
- if (m_arguments) {
- if (!m_arguments->isEqual(msg->m_arguments.get()))
- return false;
- // Never treat objects as equal - their properties might change over time.
- for (size_t i = 0; i < m_arguments->argumentCount(); ++i) {
- if (m_arguments->argumentAt(i).isObject())
- return false;
- }
- } else if (msg->m_arguments)
- return false;
-
- if (m_callStack) {
- if (!m_callStack->isEqual(msg->m_callStack.get()))
- return false;
- } else if (msg->m_callStack)
- return false;
-
- return msg->m_source == m_source
- && msg->m_type == m_type
- && msg->m_level == m_level
- && msg->m_message == m_message
- && msg->m_line == m_line
- && msg->m_column == m_column
- && msg->m_url == m_url
- && msg->m_requestId == m_requestId;
-}
-
-void ConsoleMessage::windowCleared(DOMWindow* window)
-{
- if (!m_arguments)
- return;
- if (domWindowFromExecState(m_arguments->globalState()) != window)
- return;
- if (!m_message)
- m_message = "<message collected>";
- m_arguments.clear();
-}
-
-unsigned ConsoleMessage::argumentCount()
-{
- if (m_arguments)
- return m_arguments->argumentCount();
- return 0;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)
diff --git a/Source/WebCore/inspector/ConsoleMessage.h b/Source/WebCore/inspector/ConsoleMessage.h
deleted file mode 100644
index 1a1eaa1..0000000
--- a/Source/WebCore/inspector/ConsoleMessage.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
- * Copyright (C) 2009, 2010 Google 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 Computer, 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 ConsoleMessage_h
-#define ConsoleMessage_h
-
-#include "ConsoleAPITypes.h"
-#include "ConsoleTypes.h"
-#include "InspectorWebFrontendDispatchers.h"
-#include "ScriptState.h"
-#include <wtf/Forward.h>
-#include <wtf/Vector.h>
-
-namespace Inspector {
-class InjectedScriptManager;
-class InspectorObject;
-}
-
-namespace WebCore {
-
-class DOMWindow;
-class ScriptArguments;
-class ScriptCallFrame;
-class ScriptCallStack;
-
-class ConsoleMessage {
- WTF_MAKE_NONCOPYABLE(ConsoleMessage); WTF_MAKE_FAST_ALLOCATED;
-public:
- ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, unsigned long requestIdentifier = 0);
- ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, const String& url, unsigned line, unsigned column, JSC::ExecState* = nullptr, unsigned long requestIdentifier = 0);
- ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
- ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptArguments>, JSC::ExecState*, unsigned long requestIdentifier = 0);
- ~ConsoleMessage();
-
- void addToFrontend(Inspector::InspectorConsoleFrontendDispatcher*, Inspector::InjectedScriptManager*, bool generatePreview);
- void updateRepeatCountInConsole(Inspector::InspectorConsoleFrontendDispatcher*);
- void incrementCount() { ++m_repeatCount; }
- bool isEqual(ConsoleMessage* msg) const;
-
- MessageSource source() const { return m_source; }
- const String& message() const { return m_message; }
- MessageType type() const { return m_type; }
-
- void windowCleared(DOMWindow*);
-
- unsigned argumentCount();
-
-private:
- void autogenerateMetadata(bool canGenerateCallStack, JSC::ExecState* = nullptr);
-
- MessageSource m_source;
- MessageType m_type;
- MessageLevel m_level;
- String m_message;
- RefPtr<ScriptArguments> m_arguments;
- RefPtr<ScriptCallStack> m_callStack;
- String m_url;
- unsigned m_line;
- unsigned m_column;
- unsigned m_repeatCount;
- String m_requestId;
-};
-
-} // namespace WebCore
-
-#endif // ConsoleMessage_h
diff --git a/Source/WebCore/inspector/IdentifiersFactory.cpp b/Source/WebCore/inspector/IdentifiersFactory.cpp
deleted file mode 100644
index dce2a28..0000000
--- a/Source/WebCore/inspector/IdentifiersFactory.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2011 Google 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 COMPUTER, 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 COMPUTER, 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"
-
-#if ENABLE(INSPECTOR)
-
-#include "IdentifiersFactory.h"
-
-#include <wtf/text/StringBuilder.h>
-
-namespace WebCore {
-
-namespace {
-static long s_lastUsedIdentifier = 0;
-}
-
-// static
-long IdentifiersFactory::s_processId;
-
-// static
-String IdentifiersFactory::createIdentifier()
-{
- return addProcessIdPrefixTo(String::number(++s_lastUsedIdentifier));
-}
-
-// static
-String IdentifiersFactory::requestId(unsigned long identifier)
-{
- if (identifier)
- return addProcessIdPrefixTo(String::number(identifier));
- return String();
-}
-
-// static
-String IdentifiersFactory::addProcessIdPrefixTo(const String& id)
-{
- StringBuilder builder;
- builder.appendNumber(s_processId);
- builder.append('.');
- builder.append(id);
- return builder.toString();
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)
diff --git a/Source/WebCore/inspector/IdentifiersFactory.h b/Source/WebCore/inspector/IdentifiersFactory.h
deleted file mode 100644
index b1a9c48..0000000
--- a/Source/WebCore/inspector/IdentifiersFactory.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2011 Google 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 COMPUTER, 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 COMPUTER, 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 IdentifiersFactory_h
-#define IdentifiersFactory_h
-
-#include <wtf/text/WTFString.h>
-
-#if ENABLE(INSPECTOR)
-
-namespace WebCore {
-
-class IdentifiersFactory {
-public:
- static void setProcessId(long processId) { s_processId = processId; }
- static String createIdentifier();
- static String requestId(unsigned long identifier);
-private:
- static String addProcessIdPrefixTo(const String& id);
-
- static long s_processId;
-};
-
-} // namespace WebCore
-
-#endif // !defined(IdentifiersFactory_h)
-
-#endif // ENABLE(INSPECTOR)
diff --git a/Source/WebCore/inspector/InspectorAllInOne.cpp b/Source/WebCore/inspector/InspectorAllInOne.cpp
index f725223..bfc42d4 100644
--- a/Source/WebCore/inspector/InspectorAllInOne.cpp
+++ b/Source/WebCore/inspector/InspectorAllInOne.cpp
@@ -27,16 +27,13 @@
#include "CommandLineAPIHost.cpp"
#include "CommandLineAPIModule.cpp"
-#include "ConsoleMessage.cpp"
#include "DOMEditor.cpp"
#include "DOMPatchSupport.cpp"
-#include "IdentifiersFactory.cpp"
#include "InjectedScriptCanvasModule.cpp"
#include "InspectorApplicationCacheAgent.cpp"
#include "InspectorCSSAgent.cpp"
#include "InspectorCanvasAgent.cpp"
#include "InspectorClient.cpp"
-#include "InspectorConsoleAgent.cpp"
#include "InspectorController.cpp"
#include "InspectorCounters.cpp"
#include "InspectorDOMAgent.cpp"
@@ -70,10 +67,8 @@
#include "PageInjectedScriptHost.cpp"
#include "PageInjectedScriptManager.cpp"
#include "PageRuntimeAgent.cpp"
-#include "ScriptArguments.cpp"
-#include "ScriptCallFrame.cpp"
-#include "ScriptCallStack.cpp"
#include "TimelineRecordFactory.cpp"
+#include "WebConsoleAgent.cpp"
#include "WebDebuggerAgent.cpp"
#include "WorkerConsoleAgent.cpp"
#include "WorkerDebuggerAgent.cpp"
diff --git a/Source/WebCore/inspector/InspectorConsoleAgent.cpp b/Source/WebCore/inspector/InspectorConsoleAgent.cpp
deleted file mode 100644
index 8a46d69..0000000
--- a/Source/WebCore/inspector/InspectorConsoleAgent.cpp
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
- * Copyright (C) 2011 Google 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. 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 INC. 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"
-
-#if ENABLE(INSPECTOR)
-
-#include "InspectorConsoleAgent.h"
-
-#include "CommandLineAPIHost.h"
-#include "Console.h"
-#include "ConsoleMessage.h"
-#include "DOMWindow.h"
-#include "InspectorWebFrontendDispatchers.h"
-#include "InstrumentingAgents.h"
-#include "PageInjectedScriptManager.h"
-#include "ResourceError.h"
-#include "ResourceResponse.h"
-#include "ScriptArguments.h"
-#include "ScriptCallFrame.h"
-#include "ScriptCallStack.h"
-#include "ScriptCallStackFactory.h"
-#include "ScriptProfiler.h"
-#include <bindings/ScriptObject.h>
-#include <wtf/CurrentTime.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/text/StringBuilder.h>
-#include <wtf/text/WTFString.h>
-
-using namespace Inspector;
-
-namespace WebCore {
-
-static const unsigned maximumConsoleMessages = 1000;
-static const int expireConsoleMessagesStep = 100;
-
-InspectorConsoleAgent::InspectorConsoleAgent(InstrumentingAgents* instrumentingAgents, PageInjectedScriptManager* injectedScriptManager)
- : InspectorAgentBase(ASCIILiteral("Console"), instrumentingAgents)
- , m_injectedScriptManager(injectedScriptManager)
- , m_previousMessage(nullptr)
- , m_expiredConsoleMessageCount(0)
- , m_enabled(false)
- , m_monitoringXHREnabled(false)
-{
- m_instrumentingAgents->setInspectorConsoleAgent(this);
-}
-
-InspectorConsoleAgent::~InspectorConsoleAgent()
-{
- m_instrumentingAgents->setInspectorConsoleAgent(nullptr);
- m_instrumentingAgents = nullptr;
- m_injectedScriptManager = nullptr;
-}
-
-void InspectorConsoleAgent::enable(ErrorString*)
-{
- if (m_enabled)
- return;
- m_enabled = true;
-
- if (m_expiredConsoleMessageCount) {
- ConsoleMessage expiredMessage(!isWorkerAgent(), OtherMessageSource, LogMessageType, WarningMessageLevel, String::format("%d console messages are not shown.", m_expiredConsoleMessageCount));
- expiredMessage.addToFrontend(m_frontendDispatcher.get(), m_injectedScriptManager, false);
- }
-
- size_t messageCount = m_consoleMessages.size();
- for (size_t i = 0; i < messageCount; ++i)
- m_consoleMessages[i]->addToFrontend(m_frontendDispatcher.get(), m_injectedScriptManager, false);
-}
-
-void InspectorConsoleAgent::disable(ErrorString*)
-{
- if (!m_enabled)
- return;
- m_enabled = false;
-}
-
-void InspectorConsoleAgent::clearMessages(ErrorString*)
-{
- m_consoleMessages.clear();
- m_expiredConsoleMessageCount = 0;
- m_previousMessage = nullptr;
- m_injectedScriptManager->releaseObjectGroup("console");
- if (m_frontendDispatcher && m_enabled)
- m_frontendDispatcher->messagesCleared();
-}
-
-void InspectorConsoleAgent::reset()
-{
- ErrorString error;
- clearMessages(&error);
- m_times.clear();
- m_counts.clear();
-}
-
-void InspectorConsoleAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
-{
- m_frontendDispatcher = std::make_unique<InspectorConsoleFrontendDispatcher>(frontendChannel);
- m_backendDispatcher = InspectorConsoleBackendDispatcher::create(backendDispatcher, this);
-}
-
-void InspectorConsoleAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
-{
- m_frontendDispatcher = nullptr;
- m_backendDispatcher.clear();
-
- String errorString;
- disable(&errorString);
-}
-
-void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtr<ScriptCallStack> callStack, unsigned long requestIdentifier)
-{
- if (!m_instrumentingAgents->inspectorEnvironment().developerExtrasEnabled())
- return;
-
- if (type == ClearMessageType) {
- ErrorString error;
- clearMessages(&error);
- }
-
- addConsoleMessage(adoptPtr(new ConsoleMessage(!isWorkerAgent(), source, type, level, message, callStack, requestIdentifier)));
-}
-
-void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier)
-{
- if (!m_instrumentingAgents->inspectorEnvironment().developerExtrasEnabled())
- return;
-
- if (type == ClearMessageType) {
- ErrorString error;
- clearMessages(&error);
- }
-
- addConsoleMessage(adoptPtr(new ConsoleMessage(!isWorkerAgent(), source, type, level, message, arguments, state, requestIdentifier)));
-}
-
-void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
-{
- if (!m_instrumentingAgents->inspectorEnvironment().developerExtrasEnabled())
- return;
-
- if (type == ClearMessageType) {
- ErrorString error;
- clearMessages(&error);
- }
-
- bool canGenerateCallStack = !isWorkerAgent() && m_frontendDispatcher;
- addConsoleMessage(adoptPtr(new ConsoleMessage(canGenerateCallStack, source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier)));
-}
-
-Vector<unsigned> InspectorConsoleAgent::consoleMessageArgumentCounts()
-{
- Vector<unsigned> result(m_consoleMessages.size());
- for (size_t i = 0; i < m_consoleMessages.size(); i++)
- result[i] = m_consoleMessages[i]->argumentCount();
- return result;
-}
-
-void InspectorConsoleAgent::startTiming(const String& title)
-{
- // Follow Firebug's behavior of requiring a title that is not null or
- // undefined for timing functions
- if (title.isNull())
- return;
-
- m_times.add(title, monotonicallyIncreasingTime());
-}
-
-void InspectorConsoleAgent::stopTiming(const String& title, PassRefPtr<ScriptCallStack> callStack)
-{
- // Follow Firebug's behavior of requiring a title that is not null or
- // undefined for timing functions
- if (title.isNull())
- return;
-
- HashMap<String, double>::iterator it = m_times.find(title);
- if (it == m_times.end())
- return;
-
- double startTime = it->value;
- m_times.remove(it);
-
- double elapsed = monotonicallyIncreasingTime() - startTime;
- String message = title + String::format(": %.3fms", elapsed * 1000);
- addMessageToConsole(ConsoleAPIMessageSource, TimingMessageType, DebugMessageLevel, message, callStack);
-}
-
-void InspectorConsoleAgent::count(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
-{
- RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(state));
- const ScriptCallFrame& lastCaller = callStack->at(0);
- // Follow Firebug's behavior of counting with null and undefined title in
- // the same bucket as no argument
- String title;
- arguments->getFirstArgumentAsString(title);
- String identifier = title + '@' + lastCaller.sourceURL() + ':' + String::number(lastCaller.lineNumber());
-
- HashMap<String, unsigned>::iterator it = m_counts.find(identifier);
- int count;
- if (it == m_counts.end())
- count = 1;
- else {
- count = it->value + 1;
- m_counts.remove(it);
- }
-
- m_counts.add(identifier, count);
-
- String message = title + ": " + String::number(count);
- addMessageToConsole(ConsoleAPIMessageSource, LogMessageType, DebugMessageLevel, message, callStack);
-}
-
-void InspectorConsoleAgent::frameWindowDiscarded(DOMWindow* window)
-{
- size_t messageCount = m_consoleMessages.size();
- for (size_t i = 0; i < messageCount; ++i)
- m_consoleMessages[i]->windowCleared(window);
- m_injectedScriptManager->discardInjectedScriptsFor(window);
-}
-
-void InspectorConsoleAgent::didFinishXHRLoading(unsigned long requestIdentifier, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber)
-{
- if (!m_instrumentingAgents->inspectorEnvironment().developerExtrasEnabled())
- return;
- if (m_frontendDispatcher && m_monitoringXHREnabled) {
- String message = "XHR finished loading: \"" + url + "\".";
- addMessageToConsole(NetworkMessageSource, LogMessageType, DebugMessageLevel, message, sendURL, sendLineNumber, sendColumnNumber, nullptr, requestIdentifier);
- }
-}
-
-void InspectorConsoleAgent::didReceiveResponse(unsigned long requestIdentifier, const ResourceResponse& response)
-{
- if (!m_instrumentingAgents->inspectorEnvironment().developerExtrasEnabled())
- return;
-
- if (response.httpStatusCode() >= 400) {
- String message = "Failed to load resource: the server responded with a status of " + String::number(response.httpStatusCode()) + " (" + response.httpStatusText() + ')';
- addMessageToConsole(NetworkMessageSource, LogMessageType, ErrorMessageLevel, message, response.url().string(), 0, 0, nullptr, requestIdentifier);
- }
-}
-
-void InspectorConsoleAgent::didFailLoading(unsigned long requestIdentifier, const ResourceError& error)
-{
- if (!m_instrumentingAgents->inspectorEnvironment().developerExtrasEnabled())
- return;
- if (error.isCancellation()) // Report failures only.
- return;
- StringBuilder message;
- message.appendLiteral("Failed to load resource");
- if (!error.localizedDescription().isEmpty()) {
- message.appendLiteral(": ");
- message.append(error.localizedDescription());
- }
- addMessageToConsole(NetworkMessageSource, LogMessageType, ErrorMessageLevel, message.toString(), error.failingURL(), 0, 0, nullptr, requestIdentifier);
-}
-
-void InspectorConsoleAgent::setMonitoringXHREnabled(ErrorString*, bool enabled)
-{
- m_monitoringXHREnabled = enabled;
-}
-
-static bool isGroupMessage(MessageType type)
-{
- return type == StartGroupMessageType
- || type == StartGroupCollapsedMessageType
- || type == EndGroupMessageType;
-}
-
-void InspectorConsoleAgent::addConsoleMessage(PassOwnPtr<ConsoleMessage> consoleMessage)
-{
- ASSERT(m_instrumentingAgents->inspectorEnvironment().developerExtrasEnabled());
- ASSERT_ARG(consoleMessage, consoleMessage);
-
- if (m_previousMessage && !isGroupMessage(m_previousMessage->type()) && m_previousMessage->isEqual(consoleMessage.get())) {
- m_previousMessage->incrementCount();
- if (m_frontendDispatcher && m_enabled)
- m_previousMessage->updateRepeatCountInConsole(m_frontendDispatcher.get());
- } else {
- m_previousMessage = consoleMessage.get();
- m_consoleMessages.append(consoleMessage);
- if (m_frontendDispatcher && m_enabled)
- m_previousMessage->addToFrontend(m_frontendDispatcher.get(), m_injectedScriptManager, true);
- }
-
- if (!m_frontendDispatcher && m_consoleMessages.size() >= maximumConsoleMessages) {
- m_expiredConsoleMessageCount += expireConsoleMessagesStep;
- m_consoleMessages.remove(0, expireConsoleMessagesStep);
- }
-}
-
-class InspectableHeapObject final : public CommandLineAPIHost::InspectableObject {
-public:
- explicit InspectableHeapObject(int heapObjectId) : m_heapObjectId(heapObjectId) { }
- virtual Deprecated::ScriptValue get(JSC::ExecState*) override
- {
- return ScriptProfiler::objectByHeapObjectId(m_heapObjectId);
- }
-private:
- int m_heapObjectId;
-};
-
-void InspectorConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId)
-{
- if (CommandLineAPIHost* commandLineAPIHost = m_injectedScriptManager->commandLineAPIHost())
- commandLineAPIHost->addInspectedObject(adoptPtr(new InspectableHeapObject(inspectedHeapObjectId)));
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)
diff --git a/Source/WebCore/inspector/InspectorConsoleAgent.h b/Source/WebCore/inspector/InspectorConsoleAgent.h
deleted file mode 100644
index 749bad8..0000000
--- a/Source/WebCore/inspector/InspectorConsoleAgent.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (C) 2011 Google 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. 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 INC. 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 InspectorConsoleAgent_h
-#define InspectorConsoleAgent_h
-
-#if ENABLE(INSPECTOR)
-
-#include "ConsoleAPITypes.h"
-#include "ConsoleTypes.h"
-#include "InspectorWebAgentBase.h"
-#include "InspectorWebBackendDispatchers.h"
-#include "InspectorWebFrontendDispatchers.h"
-#include "ScriptState.h"
-#include <wtf/Forward.h>
-#include <wtf/HashMap.h>
-#include <wtf/Noncopyable.h>
-#include <wtf/Vector.h>
-#include <wtf/text/StringHash.h>
-
-namespace WebCore {
-
-class ConsoleMessage;
-class DOMWindow;
-class InstrumentingAgents;
-class PageInjectedScriptManager;
-class ResourceError;
-class ResourceResponse;
-class ScriptArguments;
-class ScriptCallStack;
-class ScriptProfile;
-
-typedef String ErrorString;
-
-class InspectorConsoleAgent : public InspectorAgentBase, public Inspector::InspectorConsoleBackendDispatcherHandler {
- WTF_MAKE_NONCOPYABLE(InspectorConsoleAgent);
-public:
- InspectorConsoleAgent(InstrumentingAgents*, PageInjectedScriptManager*);
- virtual ~InspectorConsoleAgent();
-
- virtual void enable(ErrorString*) override;
- virtual void disable(ErrorString*) override;
- virtual void clearMessages(ErrorString*) override;
- bool enabled() const { return m_enabled; }
- void reset();
-
- virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
- virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
-
- void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, JSC::ExecState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier = 0);
- void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = nullptr, unsigned long requestIdentifier = 0);
-
- // FIXME: Remove once we no longer generate stacks outside of Inspector.
- void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
-
- Vector<unsigned> consoleMessageArgumentCounts();
-
- void startTiming(const String& title);
- void stopTiming(const String& title, PassRefPtr<ScriptCallStack>);
- void count(JSC::ExecState*, PassRefPtr<ScriptArguments>);
-
- void frameWindowDiscarded(DOMWindow*);
-
- void didFinishXHRLoading(unsigned long requestIdentifier, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber);
- void didReceiveResponse(unsigned long requestIdentifier, const ResourceResponse&);
- void didFailLoading(unsigned long requestIdentifier, const ResourceError&);
- void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
- void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
- virtual void setMonitoringXHREnabled(ErrorString*, bool enabled) override;
- virtual void addInspectedNode(ErrorString*, int nodeId) = 0;
- virtual void addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId) override;
-
- virtual bool isWorkerAgent() = 0;
-
-protected:
- void addConsoleMessage(PassOwnPtr<ConsoleMessage>);
-
- PageInjectedScriptManager* m_injectedScriptManager;
- std::unique_ptr<Inspector::InspectorConsoleFrontendDispatcher> m_frontendDispatcher;
- RefPtr<Inspector::InspectorConsoleBackendDispatcher> m_backendDispatcher;
- ConsoleMessage* m_previousMessage;
- Vector<OwnPtr<ConsoleMessage>> m_consoleMessages;
- int m_expiredConsoleMessageCount;
- HashMap<String, unsigned> m_counts;
- HashMap<String, double> m_times;
- bool m_enabled;
- bool m_monitoringXHREnabled;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)
-
-#endif // !defined(InspectorConsoleAgent_h)
diff --git a/Source/WebCore/inspector/InspectorConsoleInstrumentation.h b/Source/WebCore/inspector/InspectorConsoleInstrumentation.h
index d88baa2..6200e6f 100644
--- a/Source/WebCore/inspector/InspectorConsoleInstrumentation.h
+++ b/Source/WebCore/inspector/InspectorConsoleInstrumentation.h
@@ -32,14 +32,14 @@
#define InspectorConsoleInstrumentation_h
#include "InspectorInstrumentation.h"
-#include "ScriptArguments.h"
-#include "ScriptCallStack.h"
#include "ScriptProfile.h"
+#include <inspector/ScriptArguments.h>
+#include <inspector/ScriptCallStack.h>
#include <wtf/PassRefPtr.h>
namespace WebCore {
-inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtr<ScriptCallStack> callStack, unsigned long requestIdentifier)
+inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtr<Inspector::ScriptCallStack> callStack, unsigned long requestIdentifier)
{
#if ENABLE(INSPECTOR)
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
@@ -55,7 +55,7 @@
#endif
}
-inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier)
+inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, JSC::ExecState* state, PassRefPtr<Inspector::ScriptArguments> arguments, unsigned long requestIdentifier)
{
#if ENABLE(INSPECTOR)
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
@@ -91,7 +91,7 @@
#endif
}
-inline void InspectorInstrumentation::addMessageToConsole(WorkerGlobalScope* workerGlobalScope, MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtr<ScriptCallStack> callStack, unsigned long requestIdentifier)
+inline void InspectorInstrumentation::addMessageToConsole(WorkerGlobalScope* workerGlobalScope, MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtr<Inspector::ScriptCallStack> callStack, unsigned long requestIdentifier)
{
#if ENABLE(INSPECTOR)
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForWorkerGlobalScope(workerGlobalScope))
@@ -126,7 +126,7 @@
#endif
}
-inline void InspectorInstrumentation::consoleCount(Page* page, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
+inline void InspectorInstrumentation::consoleCount(Page* page, JSC::ExecState* state, PassRefPtr<Inspector::ScriptArguments> arguments)
{
#if ENABLE(INSPECTOR)
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
@@ -149,7 +149,7 @@
#endif
}
-inline void InspectorInstrumentation::stopConsoleTiming(Frame* frame, const String& title, PassRefPtr<ScriptCallStack> stack)
+inline void InspectorInstrumentation::stopConsoleTiming(Frame* frame, const String& title, PassRefPtr<Inspector::ScriptCallStack> stack)
{
#if ENABLE(INSPECTOR)
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
@@ -161,7 +161,7 @@
#endif
}
-inline void InspectorInstrumentation::consoleTimeStamp(Frame* frame, PassRefPtr<ScriptArguments> arguments)
+inline void InspectorInstrumentation::consoleTimeStamp(Frame* frame, PassRefPtr<Inspector::ScriptArguments> arguments)
{
#if ENABLE(INSPECTOR)
FAST_RETURN_IF_NO_FRONTENDS(void());
@@ -187,7 +187,7 @@
#endif
}
-inline void InspectorInstrumentation::addProfile(Page* page, PassRefPtr<ScriptProfile> profile, PassRefPtr<ScriptCallStack> callStack)
+inline void InspectorInstrumentation::addProfile(Page* page, PassRefPtr<ScriptProfile> profile, PassRefPtr<Inspector::ScriptCallStack> callStack)
{
#if ENABLE(INSPECTOR)
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
diff --git a/Source/WebCore/inspector/InspectorController.cpp b/Source/WebCore/inspector/InspectorController.cpp
index 233b038..3dac01b 100644
--- a/Source/WebCore/inspector/InspectorController.cpp
+++ b/Source/WebCore/inspector/InspectorController.cpp
@@ -36,7 +36,6 @@
#include "CommandLineAPIHost.h"
#include "DOMWrapperWorld.h"
#include "GraphicsContext.h"
-#include "IdentifiersFactory.h"
#include "InspectorApplicationCacheAgent.h"
#include "InspectorCSSAgent.h"
#include "InspectorCanvasAgent.h"
@@ -72,6 +71,7 @@
#include "PageInjectedScriptManager.h"
#include "PageRuntimeAgent.h"
#include "Settings.h"
+#include <inspector/IdentifiersFactory.h>
#include <inspector/InspectorBackendDispatcher.h>
#include <inspector/agents/InspectorAgent.h>
#include <runtime/JSLock.h>
@@ -141,8 +141,9 @@
m_resourceAgent = resourceAgentPtr.get();
m_agents.append(std::move(resourceAgentPtr));
- auto consoleAgentPtr = std::make_unique<PageConsoleAgent>(m_instrumentingAgents.get(), m_injectedScriptManager.get(), m_domAgent);
- InspectorConsoleAgent* consoleAgent = consoleAgentPtr.get();
+ auto consoleAgentPtr = std::make_unique<PageConsoleAgent>(m_injectedScriptManager.get(), m_domAgent);
+ WebConsoleAgent* consoleAgent = consoleAgentPtr.get();
+ m_instrumentingAgents->setWebConsoleAgent(consoleAgentPtr.get());
m_agents.append(std::move(consoleAgentPtr));
auto debuggerAgentPtr = std::make_unique<PageDebuggerAgent>(m_injectedScriptManager.get(), m_instrumentingAgents.get(), pageAgent, m_overlay.get());
@@ -271,7 +272,7 @@
m_inspectorBackendDispatcher.clear();
m_inspectorFrontendChannel = nullptr;
- // relese overlay page resources
+ // Release overlay page resources.
m_overlay->freePage();
InspectorInstrumentation::frontendDeleted();
InspectorInstrumentation::unregisterInstrumentingAgents(m_instrumentingAgents.get());
diff --git a/Source/WebCore/inspector/InspectorDOMAgent.cpp b/Source/WebCore/inspector/InspectorDOMAgent.cpp
index 7313164..74a526d 100644
--- a/Source/WebCore/inspector/InspectorDOMAgent.cpp
+++ b/Source/WebCore/inspector/InspectorDOMAgent.cpp
@@ -63,7 +63,6 @@
#include "HTMLNames.h"
#include "HTMLTemplateElement.h"
#include "HitTestResult.h"
-#include "IdentifiersFactory.h"
#include "InspectorHistory.h"
#include "InspectorNodeFinder.h"
#include "InspectorOverlay.h"
@@ -91,6 +90,7 @@
#include "XPathResult.h"
#include "htmlediting.h"
#include "markup.h"
+#include <inspector/IdentifiersFactory.h>
#include <inspector/InjectedScript.h>
#include <inspector/InjectedScriptManager.h>
#include <wtf/HashSet.h>
diff --git a/Source/WebCore/inspector/InspectorFrontendHost.h b/Source/WebCore/inspector/InspectorFrontendHost.h
index 9dc67b0..ab0e7d3 100644
--- a/Source/WebCore/inspector/InspectorFrontendHost.h
+++ b/Source/WebCore/inspector/InspectorFrontendHost.h
@@ -29,7 +29,6 @@
#ifndef InspectorFrontendHost_h
#define InspectorFrontendHost_h
-#include "ConsoleTypes.h"
#include "ContextMenu.h"
#include "ContextMenuProvider.h"
#include <wtf/RefCounted.h>
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp
index 235ecce..f158923 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.cpp
+++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp
@@ -35,8 +35,6 @@
#include "CSSRule.h"
#include "CSSStyleRule.h"
-#include "ConsoleAPITypes.h"
-#include "ConsoleTypes.h"
#include "DOMWindow.h"
#include "DOMWrapperWorld.h"
#include "Database.h"
@@ -46,7 +44,6 @@
#include "InspectorApplicationCacheAgent.h"
#include "InspectorCSSAgent.h"
#include "InspectorCanvasAgent.h"
-#include "InspectorConsoleAgent.h"
#include "InspectorDOMAgent.h"
#include "InspectorDOMDebuggerAgent.h"
#include "InspectorDOMStorageAgent.h"
@@ -64,16 +61,18 @@
#include "PageRuntimeAgent.h"
#include "RenderObject.h"
#include "RenderView.h"
-#include "ScriptArguments.h"
-#include "ScriptCallStack.h"
#include "ScriptController.h"
#include "ScriptProfile.h"
#include "StyleResolver.h"
#include "StyleRule.h"
+#include "WebConsoleAgent.h"
#include "WorkerGlobalScope.h"
#include "WorkerRuntimeAgent.h"
#include "WorkerThread.h"
#include "XMLHttpRequest.h"
+#include <inspector/ConsoleTypes.h>
+#include <inspector/ScriptArguments.h>
+#include <inspector/ScriptCallStack.h>
#include <inspector/agents/InspectorDebuggerAgent.h>
#include <wtf/StdLibExtras.h>
#include <wtf/text/CString.h>
@@ -183,7 +182,7 @@
void InspectorInstrumentation::frameWindowDiscardedImpl(InstrumentingAgents* instrumentingAgents, DOMWindow* window)
{
- if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
+ if (WebConsoleAgent* consoleAgent = instrumentingAgents->webConsoleAgent())
consoleAgent->frameWindowDiscarded(window);
}
@@ -600,7 +599,7 @@
InstrumentingAgents* instrumentingAgents = cookie.instrumentingAgents();
if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
resourceAgent->didReceiveResponse(identifier, loader, response, resourceLoader);
- if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
+ if (WebConsoleAgent* consoleAgent = instrumentingAgents->webConsoleAgent())
consoleAgent->didReceiveResponse(identifier, response); // This should come AFTER resource notification, front-end relies on this.
}
@@ -645,7 +644,7 @@
timelineAgent->didFinishLoadingResource(identifier, true, 0, loader->frame());
if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
resourceAgent->didFailLoading(identifier, loader, error);
- if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
+ if (WebConsoleAgent* consoleAgent = instrumentingAgents->webConsoleAgent())
consoleAgent->didFailLoading(identifier, error); // This should come AFTER resource notification, front-end relies on this.
}
@@ -669,7 +668,7 @@
void InspectorInstrumentation::didFinishXHRLoadingImpl(InstrumentingAgents* instrumentingAgents, ThreadableLoaderClient* client, unsigned long identifier, const String& sourceString, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber)
{
- if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
+ if (WebConsoleAgent* consoleAgent = instrumentingAgents->webConsoleAgent())
consoleAgent->didFinishXHRLoading(identifier, url, sendURL, sendLineNumber, sendColumnNumber);
if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
resourceAgent->didFinishXHRLoading(client, identifier, sourceString);
@@ -752,7 +751,7 @@
return;
if (loader->frame()->isMainFrame()) {
- if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
+ if (WebConsoleAgent* consoleAgent = instrumentingAgents->webConsoleAgent())
consoleAgent->reset();
if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
@@ -862,13 +861,13 @@
// JavaScriptCore InspectorDebuggerAgent should know Console MessageTypes.
static bool isConsoleAssertMessage(MessageSource source, MessageType type)
{
- return source == ConsoleAPIMessageSource && type == AssertMessageType;
+ return source == MessageSource::ConsoleAPI && type == MessageType::Assert;
}
// FIXME: Drop this once we no longer generate stacks outside of Inspector.
void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtr<ScriptCallStack> callStack, unsigned long requestIdentifier)
{
- if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
+ if (WebConsoleAgent* consoleAgent = instrumentingAgents->webConsoleAgent())
consoleAgent->addMessageToConsole(source, type, level, message, callStack, requestIdentifier);
// FIXME: This should just pass the message on to the debugger agent. JavaScriptCore InspectorDebuggerAgent should know Console MessageTypes.
if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDebuggerAgent()) {
@@ -879,7 +878,7 @@
void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier)
{
- if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
+ if (WebConsoleAgent* consoleAgent = instrumentingAgents->webConsoleAgent())
consoleAgent->addMessageToConsole(source, type, level, message, state, arguments, requestIdentifier);
// FIXME: This should just pass the message on to the debugger agent. JavaScriptCore InspectorDebuggerAgent should know Console MessageTypes.
if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDebuggerAgent()) {
@@ -890,13 +889,13 @@
void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
{
- if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
+ if (WebConsoleAgent* consoleAgent = instrumentingAgents->webConsoleAgent())
consoleAgent->addMessageToConsole(source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier);
}
void InspectorInstrumentation::consoleCountImpl(InstrumentingAgents* instrumentingAgents, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
{
- if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
+ if (WebConsoleAgent* consoleAgent = instrumentingAgents->webConsoleAgent())
consoleAgent->count(state, arguments);
}
@@ -904,13 +903,13 @@
{
if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent())
timelineAgent->time(frame, title);
- if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
+ if (WebConsoleAgent* consoleAgent = instrumentingAgents->webConsoleAgent())
consoleAgent->startTiming(title);
}
void InspectorInstrumentation::stopConsoleTimingImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, const String& title, PassRefPtr<ScriptCallStack> stack)
{
- if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
+ if (WebConsoleAgent* consoleAgent = instrumentingAgents->webConsoleAgent())
consoleAgent->stopTiming(title, stack);
if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent())
timelineAgent->timeEnd(frame, title);
@@ -1072,7 +1071,7 @@
bool InspectorInstrumentation::consoleAgentEnabled(ScriptExecutionContext* scriptExecutionContext)
{
InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext);
- InspectorConsoleAgent* consoleAgent = instrumentingAgents ? instrumentingAgents->inspectorConsoleAgent() : nullptr;
+ InspectorConsoleAgent* consoleAgent = instrumentingAgents ? instrumentingAgents->webConsoleAgent() : nullptr;
return consoleAgent && consoleAgent->enabled();
}
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.h b/Source/WebCore/inspector/InspectorInstrumentation.h
index 62399dc..cd5e91c 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.h
+++ b/Source/WebCore/inspector/InspectorInstrumentation.h
@@ -32,8 +32,6 @@
#define InspectorInstrumentation_h
#include "CSSSelector.h"
-#include "ConsoleAPITypes.h"
-#include "ConsoleTypes.h"
#include "Element.h"
#include "FormData.h"
#include "Frame.h"
@@ -44,12 +42,18 @@
#include "ScriptState.h"
#include "StorageArea.h"
#include "WebSocketFrame.h"
+#include <inspector/ConsoleTypes.h>
#include <wtf/RefPtr.h>
namespace Deprecated {
class ScriptObject;
}
+namespace Inspector {
+class ScriptArguments;
+class ScriptCallStack;
+}
+
namespace WebCore {
class CSSRule;
@@ -77,8 +81,6 @@
class RenderObject;
class ResourceRequest;
class ResourceResponse;
-class ScriptArguments;
-class ScriptCallStack;
class ScriptExecutionContext;
class ScriptProfile;
class SecurityOrigin;
@@ -203,18 +205,18 @@
static void didWriteHTML(const InspectorInstrumentationCookie&, unsigned endLine);
// FIXME: Remove once we no longer generate stacks outside of Inspector.
- static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
- static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, JSC::ExecState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier = 0);
+ static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<Inspector::ScriptCallStack>, unsigned long requestIdentifier = 0);
+ static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>, unsigned long requestIdentifier = 0);
static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = nullptr, unsigned long requestIdentifier = 0);
// FIXME: Convert to ScriptArguments to match non-worker context.
- static void addMessageToConsole(WorkerGlobalScope*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
+ static void addMessageToConsole(WorkerGlobalScope*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<Inspector::ScriptCallStack>, unsigned long requestIdentifier = 0);
static void addMessageToConsole(WorkerGlobalScope*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = nullptr, unsigned long requestIdentifier = 0);
- static void consoleCount(Page*, JSC::ExecState*, PassRefPtr<ScriptArguments>);
+ static void consoleCount(Page*, JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>);
static void startConsoleTiming(Frame*, const String& title);
- static void stopConsoleTiming(Frame*, const String& title, PassRefPtr<ScriptCallStack>);
- static void consoleTimeStamp(Frame*, PassRefPtr<ScriptArguments>);
+ static void stopConsoleTiming(Frame*, const String& title, PassRefPtr<Inspector::ScriptCallStack>);
+ static void consoleTimeStamp(Frame*, PassRefPtr<Inspector::ScriptArguments>);
static void didRequestAnimationFrame(Document*, int callbackId);
static void didCancelAnimationFrame(Document*, int callbackId);
@@ -222,7 +224,7 @@
static void didFireAnimationFrame(const InspectorInstrumentationCookie&);
static void addStartProfilingMessageToConsole(Page*, const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
- static void addProfile(Page*, PassRefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
+ static void addProfile(Page*, PassRefPtr<ScriptProfile>, PassRefPtr<Inspector::ScriptCallStack>);
static String getCurrentUserInitiatedProfileName(Page*, bool incrementProfileNumber);
static bool profilerEnabled(Page*);
@@ -385,16 +387,16 @@
static InspectorInstrumentationCookie willWriteHTMLImpl(InstrumentingAgents*, unsigned startLine, Frame*);
static void didWriteHTMLImpl(const InspectorInstrumentationCookie&, unsigned endLine);
- static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, JSC::ExecState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier);
+ static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>, unsigned long requestIdentifier);
static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState*, unsigned long requestIdentifier);
// FIXME: Remove once we no longer generate stacks outside of Inspector.
- static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier);
+ static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<Inspector::ScriptCallStack>, unsigned long requestIdentifier);
- static void consoleCountImpl(InstrumentingAgents*, JSC::ExecState*, PassRefPtr<ScriptArguments>);
+ static void consoleCountImpl(InstrumentingAgents*, JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>);
static void startConsoleTimingImpl(InstrumentingAgents*, Frame*, const String& title);
- static void stopConsoleTimingImpl(InstrumentingAgents*, Frame*, const String& title, PassRefPtr<ScriptCallStack>);
- static void consoleTimeStampImpl(InstrumentingAgents*, Frame*, PassRefPtr<ScriptArguments>);
+ static void stopConsoleTimingImpl(InstrumentingAgents*, Frame*, const String& title, PassRefPtr<Inspector::ScriptCallStack>);
+ static void consoleTimeStampImpl(InstrumentingAgents*, Frame*, PassRefPtr<Inspector::ScriptArguments>);
static void didRequestAnimationFrameImpl(InstrumentingAgents*, int callbackId, Frame*);
static void didCancelAnimationFrameImpl(InstrumentingAgents*, int callbackId, Frame*);
@@ -402,7 +404,7 @@
static void didFireAnimationFrameImpl(const InspectorInstrumentationCookie&);
static void addStartProfilingMessageToConsoleImpl(InstrumentingAgents*, const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL);
- static void addProfileImpl(InstrumentingAgents*, RefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
+ static void addProfileImpl(InstrumentingAgents*, RefPtr<ScriptProfile>, PassRefPtr<Inspector::ScriptCallStack>);
static String getCurrentUserInitiatedProfileNameImpl(InstrumentingAgents*, bool incrementProfileNumber);
static bool profilerEnabledImpl(InstrumentingAgents*);
diff --git a/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp b/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp
index 4c1f006..33aff85 100644
--- a/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp
+++ b/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp
@@ -34,7 +34,6 @@
#include "InspectorLayerTreeAgent.h"
-#include "IdentifiersFactory.h"
#include "InspectorDOMAgent.h"
#include "InspectorWebFrontendDispatchers.h"
#include "InstrumentingAgents.h"
@@ -44,6 +43,7 @@
#include "RenderLayerBacking.h"
#include "RenderLayerCompositor.h"
#include "RenderView.h"
+#include <inspector/IdentifiersFactory.h>
using namespace Inspector;
diff --git a/Source/WebCore/inspector/InspectorPageAgent.cpp b/Source/WebCore/inspector/InspectorPageAgent.cpp
index f27930c..cfee5d8 100644
--- a/Source/WebCore/inspector/InspectorPageAgent.cpp
+++ b/Source/WebCore/inspector/InspectorPageAgent.cpp
@@ -29,11 +29,10 @@
*/
#include "config.h"
+#include "InspectorPageAgent.h"
#if ENABLE(INSPECTOR)
-#include "InspectorPageAgent.h"
-
#include "CachedCSSStyleSheet.h"
#include "CachedFont.h"
#include "CachedImage.h"
@@ -53,7 +52,6 @@
#include "FrameView.h"
#include "HTMLFrameOwnerElement.h"
#include "HTMLNames.h"
-#include "IdentifiersFactory.h"
#include "ImageBuffer.h"
#include "InspectorClient.h"
#include "InspectorDOMAgent.h"
@@ -73,6 +71,7 @@
#include "UserGestureIndicator.h"
#include <bindings/ScriptValue.h>
#include <inspector/ContentSearchUtilities.h>
+#include <inspector/IdentifiersFactory.h>
#include <inspector/InspectorValues.h>
#include <wtf/CurrentTime.h>
#include <wtf/ListHashSet.h>
diff --git a/Source/WebCore/inspector/InspectorProfilerAgent.cpp b/Source/WebCore/inspector/InspectorProfilerAgent.cpp
index e8407ee..c52c66a 100644
--- a/Source/WebCore/inspector/InspectorProfilerAgent.cpp
+++ b/Source/WebCore/inspector/InspectorProfilerAgent.cpp
@@ -28,29 +28,27 @@
*/
#include "config.h"
+#include "InspectorProfilerAgent.h"
#if ENABLE(INSPECTOR)
-#include "InspectorProfilerAgent.h"
-
#include "CommandLineAPIHost.h"
#include "Console.h"
-#include "ConsoleAPITypes.h"
-#include "ConsoleTypes.h"
-#include "InspectorConsoleAgent.h"
#include "InspectorWebFrontendDispatchers.h"
#include "InstrumentingAgents.h"
-#include "URL.h"
#include "Page.h"
#include "PageInjectedScriptManager.h"
#include "PageScriptDebugServer.h"
#include "ScriptHeapSnapshot.h"
#include "ScriptProfile.h"
#include "ScriptProfiler.h"
+#include "URL.h"
#include "WorkerScriptDebugServer.h"
#include <bindings/ScriptObject.h>
+#include <inspector/ConsoleTypes.h>
#include <inspector/InjectedScript.h>
#include <inspector/InspectorValues.h>
+#include <inspector/agents/InspectorConsoleAgent.h>
#include <wtf/CurrentTime.h>
#include <wtf/OwnPtr.h>
#include <wtf/text/StringConcatenate.h>
@@ -156,14 +154,14 @@
return;
RefPtr<ScriptProfile> profile = prpProfile;
String message = makeString(profile->title(), '#', String::number(profile->uid()));
- m_consoleAgent->addMessageToConsole(ConsoleAPIMessageSource, ProfileEndMessageType, DebugMessageLevel, message, sourceURL, lineNumber, columnNumber);
+ m_consoleAgent->addMessageToConsole(MessageSource::ConsoleAPI, MessageType::ProfileEnd, MessageLevel::Debug, message, sourceURL, lineNumber, columnNumber);
}
void InspectorProfilerAgent::addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL)
{
if (!m_frontendDispatcher)
return;
- m_consoleAgent->addMessageToConsole(ConsoleAPIMessageSource, ProfileMessageType, DebugMessageLevel, title, sourceURL, lineNumber, columnNumber);
+ m_consoleAgent->addMessageToConsole(MessageSource::ConsoleAPI, MessageType::Profile, MessageLevel::Debug, title, sourceURL, lineNumber, columnNumber);
}
void InspectorProfilerAgent::collectGarbage(WebCore::ErrorString*)
diff --git a/Source/WebCore/inspector/InspectorProfilerAgent.h b/Source/WebCore/inspector/InspectorProfilerAgent.h
index b9b6031..7dfe18c 100644
--- a/Source/WebCore/inspector/InspectorProfilerAgent.h
+++ b/Source/WebCore/inspector/InspectorProfilerAgent.h
@@ -43,12 +43,12 @@
namespace Inspector {
class InspectorArray;
+class InspectorConsoleAgent;
class InspectorObject;
}
namespace WebCore {
-class InspectorConsoleAgent;
class InstrumentingAgents;
class Page;
class PageInjectedScriptManager;
@@ -61,8 +61,8 @@
class InspectorProfilerAgent : public InspectorAgentBase, public Inspector::InspectorProfilerBackendDispatcherHandler {
WTF_MAKE_NONCOPYABLE(InspectorProfilerAgent); WTF_MAKE_FAST_ALLOCATED;
public:
- static std::unique_ptr<InspectorProfilerAgent> create(InstrumentingAgents*, InspectorConsoleAgent*, Page*, PageInjectedScriptManager*);
- static std::unique_ptr<InspectorProfilerAgent> create(InstrumentingAgents*, InspectorConsoleAgent*, WorkerGlobalScope*, PageInjectedScriptManager*);
+ static std::unique_ptr<InspectorProfilerAgent> create(InstrumentingAgents*, Inspector::InspectorConsoleAgent*, Page*, PageInjectedScriptManager*);
+ static std::unique_ptr<InspectorProfilerAgent> create(InstrumentingAgents*, Inspector::InspectorConsoleAgent*, WorkerGlobalScope*, PageInjectedScriptManager*);
virtual ~InspectorProfilerAgent();
@@ -101,7 +101,7 @@
virtual void getHeapObjectId(ErrorString*, const String& objectId, String* heapSnapshotObjectId) override;
protected:
- InspectorProfilerAgent(InstrumentingAgents*, InspectorConsoleAgent*, PageInjectedScriptManager*);
+ InspectorProfilerAgent(InstrumentingAgents*, Inspector::InspectorConsoleAgent*, PageInjectedScriptManager*);
virtual void startProfiling(const String& title) = 0;
virtual PassRefPtr<ScriptProfile> stopProfiling(const String& title) = 0;
@@ -115,7 +115,7 @@
PassRefPtr<Inspector::TypeBuilder::Profiler::ProfileHeader> createProfileHeader(const ScriptProfile&);
PassRefPtr<Inspector::TypeBuilder::Profiler::ProfileHeader> createSnapshotHeader(const ScriptHeapSnapshot&);
- InspectorConsoleAgent* m_consoleAgent;
+ Inspector::InspectorConsoleAgent* m_consoleAgent;
PageInjectedScriptManager* m_injectedScriptManager;
std::unique_ptr<Inspector::InspectorProfilerFrontendDispatcher> m_frontendDispatcher;
RefPtr<Inspector::InspectorProfilerBackendDispatcher> m_backendDispatcher;
diff --git a/Source/WebCore/inspector/InspectorResourceAgent.cpp b/Source/WebCore/inspector/InspectorResourceAgent.cpp
index 65f8db1..480bde9 100644
--- a/Source/WebCore/inspector/InspectorResourceAgent.cpp
+++ b/Source/WebCore/inspector/InspectorResourceAgent.cpp
@@ -29,11 +29,10 @@
*/
#include "config.h"
+#include "InspectorResourceAgent.h"
#if ENABLE(INSPECTOR)
-#include "InspectorResourceAgent.h"
-
#include "CachedRawResource.h"
#include "CachedResource.h"
#include "CachedResourceLoader.h"
@@ -44,11 +43,11 @@
#include "FrameLoader.h"
#include "HTTPHeaderMap.h"
#include "IconController.h"
-#include "IdentifiersFactory.h"
#include "InspectorClient.h"
#include "InspectorPageAgent.h"
#include "InspectorWebFrontendDispatchers.h"
#include "InstrumentingAgents.h"
+#include "JSMainThreadExecState.h"
#include "MemoryCache.h"
#include "NetworkResourcesData.h"
#include "Page.h"
@@ -58,15 +57,16 @@
#include "ResourceLoader.h"
#include "ResourceRequest.h"
#include "ResourceResponse.h"
-#include "ScriptCallStack.h"
-#include "ScriptCallStackFactory.h"
#include "ScriptableDocumentParser.h"
#include "Settings.h"
#include "SubresourceLoader.h"
#include "URL.h"
#include "WebSocketFrame.h"
#include "XMLHttpRequest.h"
+#include <inspector/IdentifiersFactory.h>
#include <inspector/InspectorValues.h>
+#include <inspector/ScriptCallStack.h>
+#include <inspector/ScriptCallStackFactory.h>
#include <wtf/CurrentTime.h>
#include <wtf/HexNumber.h>
#include <wtf/ListHashSet.h>
@@ -439,7 +439,7 @@
PassRefPtr<Inspector::TypeBuilder::Network::Initiator> InspectorResourceAgent::buildInitiatorObject(Document* document)
{
- RefPtr<ScriptCallStack> stackTrace = createScriptCallStack(ScriptCallStack::maxCallStackSizeToCapture, true);
+ RefPtr<ScriptCallStack> stackTrace = createScriptCallStack(JSMainThreadExecState::currentState(), ScriptCallStack::maxCallStackSizeToCapture, true);
if (stackTrace && stackTrace->size() > 0) {
RefPtr<Inspector::TypeBuilder::Network::Initiator> initiatorObject = Inspector::TypeBuilder::Network::Initiator::create()
.setType(Inspector::TypeBuilder::Network::Initiator::Type::Script);
diff --git a/Source/WebCore/inspector/InspectorTimelineAgent.cpp b/Source/WebCore/inspector/InspectorTimelineAgent.cpp
index 8aec68e..4a0cefb 100644
--- a/Source/WebCore/inspector/InspectorTimelineAgent.cpp
+++ b/Source/WebCore/inspector/InspectorTimelineAgent.cpp
@@ -37,7 +37,6 @@
#include "Event.h"
#include "Frame.h"
#include "FrameView.h"
-#include "IdentifiersFactory.h"
#include "InspectorClient.h"
#include "InspectorCounters.h"
#include "InspectorInstrumentation.h"
@@ -53,6 +52,7 @@
#include "ResourceResponse.h"
#include "ScriptProfiler.h"
#include "TimelineRecordFactory.h"
+#include <inspector/IdentifiersFactory.h>
#include <wtf/CurrentTime.h>
using namespace Inspector;
diff --git a/Source/WebCore/inspector/InstrumentingAgents.cpp b/Source/WebCore/inspector/InstrumentingAgents.cpp
index 98e6bdd..b22c7b5 100644
--- a/Source/WebCore/inspector/InstrumentingAgents.cpp
+++ b/Source/WebCore/inspector/InstrumentingAgents.cpp
@@ -49,7 +49,7 @@
, m_inspectorPageAgent(nullptr)
, m_inspectorCSSAgent(nullptr)
, m_inspectorLayerTreeAgent(nullptr)
- , m_inspectorConsoleAgent(nullptr)
+ , m_webConsoleAgent(nullptr)
, m_inspectorDOMAgent(nullptr)
, m_inspectorResourceAgent(nullptr)
, m_pageRuntimeAgent(nullptr)
@@ -75,7 +75,7 @@
m_inspectorPageAgent = nullptr;
m_inspectorCSSAgent = nullptr;
m_inspectorLayerTreeAgent = nullptr;
- m_inspectorConsoleAgent = nullptr;
+ m_webConsoleAgent = nullptr;
m_inspectorDOMAgent = nullptr;
m_inspectorResourceAgent = nullptr;
m_pageRuntimeAgent = nullptr;
diff --git a/Source/WebCore/inspector/InstrumentingAgents.h b/Source/WebCore/inspector/InstrumentingAgents.h
index c99d269..37fab15 100644
--- a/Source/WebCore/inspector/InstrumentingAgents.h
+++ b/Source/WebCore/inspector/InstrumentingAgents.h
@@ -47,7 +47,6 @@
class InspectorApplicationCacheAgent;
class InspectorCSSAgent;
class InspectorCanvasAgent;
-class InspectorConsoleAgent;
class InspectorDOMAgent;
class InspectorDOMDebuggerAgent;
class InspectorDOMStorageAgent;
@@ -62,6 +61,7 @@
class Page;
class PageDebuggerAgent;
class PageRuntimeAgent;
+class WebConsoleAgent;
class WorkerGlobalScope;
class WorkerRuntimeAgent;
@@ -87,8 +87,8 @@
InspectorCSSAgent* inspectorCSSAgent() const { return m_inspectorCSSAgent; }
void setInspectorCSSAgent(InspectorCSSAgent* agent) { m_inspectorCSSAgent = agent; }
- InspectorConsoleAgent* inspectorConsoleAgent() const { return m_inspectorConsoleAgent; }
- void setInspectorConsoleAgent(InspectorConsoleAgent* agent) { m_inspectorConsoleAgent = agent; }
+ WebConsoleAgent* webConsoleAgent() const { return m_webConsoleAgent; }
+ void setWebConsoleAgent(WebConsoleAgent* agent) { m_webConsoleAgent = agent; }
InspectorDOMAgent* inspectorDOMAgent() const { return m_inspectorDOMAgent; }
void setInspectorDOMAgent(InspectorDOMAgent* agent) { m_inspectorDOMAgent = agent; }
@@ -149,7 +149,7 @@
InspectorPageAgent* m_inspectorPageAgent;
InspectorCSSAgent* m_inspectorCSSAgent;
InspectorLayerTreeAgent* m_inspectorLayerTreeAgent;
- InspectorConsoleAgent* m_inspectorConsoleAgent;
+ WebConsoleAgent* m_webConsoleAgent;
InspectorDOMAgent* m_inspectorDOMAgent;
InspectorResourceAgent* m_inspectorResourceAgent;
PageRuntimeAgent* m_pageRuntimeAgent;
diff --git a/Source/WebCore/inspector/PageConsoleAgent.cpp b/Source/WebCore/inspector/PageConsoleAgent.cpp
index 1adb449..7159cdd 100644
--- a/Source/WebCore/inspector/PageConsoleAgent.cpp
+++ b/Source/WebCore/inspector/PageConsoleAgent.cpp
@@ -34,7 +34,6 @@
#if ENABLE(INSPECTOR)
#include "CommandLineAPIHost.h"
-#include "DOMWindow.h"
#include "InspectorDOMAgent.h"
#include "Node.h"
#include "PageInjectedScriptManager.h"
@@ -43,21 +42,17 @@
namespace WebCore {
-PageConsoleAgent::PageConsoleAgent(InstrumentingAgents* instrumentingAgents, PageInjectedScriptManager* injectedScriptManager, InspectorDOMAgent* domAgent)
- : InspectorConsoleAgent(instrumentingAgents, injectedScriptManager)
+PageConsoleAgent::PageConsoleAgent(PageInjectedScriptManager* injectedScriptManager, InspectorDOMAgent* domAgent)
+ : WebConsoleAgent(injectedScriptManager)
, m_inspectorDOMAgent(domAgent)
{
}
-PageConsoleAgent::~PageConsoleAgent()
-{
- m_inspectorDOMAgent = nullptr;
-}
-
void PageConsoleAgent::clearMessages(ErrorString* errorString)
{
m_inspectorDOMAgent->releaseDanglingNodes();
- InspectorConsoleAgent::clearMessages(errorString);
+
+ WebConsoleAgent::clearMessages(errorString);
}
class InspectableNode final : public CommandLineAPIHost::InspectableObject {
@@ -79,7 +74,7 @@
return;
}
- if (CommandLineAPIHost* commandLineAPIHost = m_injectedScriptManager->commandLineAPIHost())
+ if (CommandLineAPIHost* commandLineAPIHost = static_cast<PageInjectedScriptManager*>(m_injectedScriptManager)->commandLineAPIHost())
commandLineAPIHost->addInspectedObject(adoptPtr(new InspectableNode(node)));
}
diff --git a/Source/WebCore/inspector/PageConsoleAgent.h b/Source/WebCore/inspector/PageConsoleAgent.h
index d557f1a..d0b5564 100644
--- a/Source/WebCore/inspector/PageConsoleAgent.h
+++ b/Source/WebCore/inspector/PageConsoleAgent.h
@@ -31,8 +31,7 @@
#ifndef PageConsoleAgent_h
#define PageConsoleAgent_h
-#include "InspectorConsoleAgent.h"
-#include <wtf/PassOwnPtr.h>
+#include "WebConsoleAgent.h"
#if ENABLE(INSPECTOR)
@@ -40,13 +39,14 @@
class InspectorDOMAgent;
-class PageConsoleAgent : public InspectorConsoleAgent {
+class PageConsoleAgent final : public WebConsoleAgent {
WTF_MAKE_NONCOPYABLE(PageConsoleAgent);
+ WTF_MAKE_FAST_ALLOCATED;
public:
- PageConsoleAgent(InstrumentingAgents*, PageInjectedScriptManager*, InspectorDOMAgent*);
- virtual ~PageConsoleAgent();
+ PageConsoleAgent(PageInjectedScriptManager*, InspectorDOMAgent*);
+ virtual ~PageConsoleAgent() { }
- virtual bool isWorkerAgent() override { return false; }
+ virtual bool isWorkerAgent() const override { return false; }
private:
virtual void clearMessages(ErrorString*) override;
diff --git a/Source/WebCore/inspector/PageDebuggerAgent.cpp b/Source/WebCore/inspector/PageDebuggerAgent.cpp
index 67f4951..e4670cd 100644
--- a/Source/WebCore/inspector/PageDebuggerAgent.cpp
+++ b/Source/WebCore/inspector/PageDebuggerAgent.cpp
@@ -43,6 +43,8 @@
#include "ScriptState.h"
#include <inspector/InjectedScript.h>
#include <inspector/InjectedScriptManager.h>
+#include <inspector/ScriptCallStack.h>
+#include <inspector/ScriptCallStackFactory.h>
using namespace Inspector;
@@ -113,9 +115,9 @@
PageConsole::unmute();
}
-void PageDebuggerAgent::breakpointActionLog(JSC::ExecState*, const String& message)
+void PageDebuggerAgent::breakpointActionLog(JSC::ExecState* exec, const String& message)
{
- m_pageAgent->page()->console().addMessage(JSMessageSource, LogMessageLevel, message);
+ m_pageAgent->page()->console().addMessage(MessageSource::JS, MessageLevel::Log, message, createScriptCallStack(exec, ScriptCallStack::maxCallStackSizeToCapture, true));
}
InjectedScript PageDebuggerAgent::injectedScriptForEval(ErrorString* errorString, const int* executionContextId)
diff --git a/Source/WebCore/inspector/PageInjectedScriptHost.h b/Source/WebCore/inspector/PageInjectedScriptHost.h
index 6582188..afbc6d9 100644
--- a/Source/WebCore/inspector/PageInjectedScriptHost.h
+++ b/Source/WebCore/inspector/PageInjectedScriptHost.h
@@ -32,6 +32,7 @@
namespace WebCore {
+// FIXME: Rename to WebInjectedScriptHost.
class PageInjectedScriptHost final : public Inspector::InjectedScriptHost {
public:
static PassRefPtr<PageInjectedScriptHost> create() { return adoptRef(new PageInjectedScriptHost); }
diff --git a/Source/WebCore/inspector/PageInjectedScriptManager.h b/Source/WebCore/inspector/PageInjectedScriptManager.h
index 1f8707e..e274e63 100644
--- a/Source/WebCore/inspector/PageInjectedScriptManager.h
+++ b/Source/WebCore/inspector/PageInjectedScriptManager.h
@@ -34,6 +34,7 @@
class DOMWindow;
+// FIXME: Rename to WebInjectedScriptManager.
class PageInjectedScriptManager final : public Inspector::InjectedScriptManager {
public:
PageInjectedScriptManager(Inspector::InspectorEnvironment&, PassRefPtr<Inspector::InjectedScriptHost>);
diff --git a/Source/WebCore/inspector/ScriptArguments.cpp b/Source/WebCore/inspector/ScriptArguments.cpp
deleted file mode 100644
index 9e65f7e..0000000
--- a/Source/WebCore/inspector/ScriptArguments.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 2010 Google 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:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * 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.
- * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER 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 "ScriptArguments.h"
-
-#include <bindings/ScriptValue.h>
-
-namespace WebCore {
-
-PassRefPtr<ScriptArguments> ScriptArguments::create(JSC::ExecState* scriptState, Vector<Deprecated::ScriptValue>& arguments)
-{
- return adoptRef(new ScriptArguments(scriptState, arguments));
-}
-
-ScriptArguments::ScriptArguments(JSC::ExecState* scriptState, Vector<Deprecated::ScriptValue>& arguments)
- : m_globalObject(scriptState->vm(), scriptState->lexicalGlobalObject())
-{
- m_arguments.swap(arguments);
-}
-
-ScriptArguments::~ScriptArguments()
-{
-}
-
-const Deprecated::ScriptValue &ScriptArguments::argumentAt(size_t index) const
-{
- ASSERT(m_arguments.size() > index);
- return m_arguments[index];
-}
-
-JSC::ExecState* ScriptArguments::globalState() const
-{
- if (m_globalObject)
- return const_cast<JSC::JSGlobalObject*>(m_globalObject.get())->globalExec();
- return nullptr;
-}
-
-bool ScriptArguments::getFirstArgumentAsString(String& result, bool checkForNullOrUndefined)
-{
- if (!argumentCount())
- return false;
-
- const Deprecated::ScriptValue& value = argumentAt(0);
- if (checkForNullOrUndefined && (value.isNull() || value.isUndefined()))
- return false;
-
- if (!globalState()) {
- ASSERT_NOT_REACHED();
- return false;
- }
-
- result = value.toString(globalState());
- return true;
-}
-
-bool ScriptArguments::isEqual(ScriptArguments* other) const
-{
- if (!other)
- return false;
-
- if (m_arguments.size() != other->m_arguments.size())
- return false;
- if (!globalState() && m_arguments.size())
- return false;
-
- for (size_t i = 0; i < m_arguments.size(); ++i) {
- if (!m_arguments[i].isEqual(other->globalState(), other->m_arguments[i]))
- return false;
- }
- return true;
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/inspector/ScriptArguments.h b/Source/WebCore/inspector/ScriptArguments.h
deleted file mode 100644
index 47a9623..0000000
--- a/Source/WebCore/inspector/ScriptArguments.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2010 Google 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:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * 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.
- * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER 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 ScriptArguments_h
-#define ScriptArguments_h
-
-#include <heap/Strong.h>
-#include <wtf/Forward.h>
-#include <wtf/RefCounted.h>
-#include <wtf/Vector.h>
-#include <wtf/text/WTFString.h>
-
-namespace Deprecated {
-class ScriptValue;
-}
-
-namespace JSC {
-class ExecState;
-class JSGlobalObject;
-}
-
-namespace WebCore {
-
-class ScriptArguments : public RefCounted<ScriptArguments> {
-public:
- static PassRefPtr<ScriptArguments> create(JSC::ExecState*, Vector<Deprecated::ScriptValue>& arguments);
-
- ~ScriptArguments();
-
- const Deprecated::ScriptValue& argumentAt(size_t) const;
- size_t argumentCount() const { return m_arguments.size(); }
-
- JSC::ExecState* globalState() const;
-
- bool getFirstArgumentAsString(WTF::String& result, bool checkForNullOrUndefined = false);
- bool isEqual(ScriptArguments*) const;
-
-private:
- ScriptArguments(JSC::ExecState*, Vector<Deprecated::ScriptValue>& arguments);
-
- JSC::Strong<JSC::JSGlobalObject> m_globalObject;
- Vector<Deprecated::ScriptValue> m_arguments;
-};
-
-} // namespace WebCore
-
-#endif // ScriptArguments_h
diff --git a/Source/WebCore/inspector/ScriptCallFrame.cpp b/Source/WebCore/inspector/ScriptCallFrame.cpp
deleted file mode 100644
index 69c28f9..0000000
--- a/Source/WebCore/inspector/ScriptCallFrame.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2010 Google 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:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * 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.
- * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER 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 "ScriptCallFrame.h"
-
-#include "InspectorWebFrontendDispatchers.h"
-#include <inspector/InspectorValues.h>
-#include <wtf/RefPtr.h>
-
-using namespace Inspector;
-
-namespace WebCore {
-
-ScriptCallFrame::ScriptCallFrame(const String& functionName, const String& scriptName, unsigned lineNumber, unsigned column)
- : m_functionName(functionName)
- , m_scriptName(scriptName)
- , m_lineNumber(lineNumber)
- , m_column(column)
-{
-}
-
-ScriptCallFrame::~ScriptCallFrame()
-{
-}
-
-bool ScriptCallFrame::isEqual(const ScriptCallFrame& o) const
-{
- return m_functionName == o.m_functionName
- && m_scriptName == o.m_scriptName
- && m_lineNumber == o.m_lineNumber
- && m_column == o.m_column;
-}
-
-#if ENABLE(INSPECTOR)
-PassRefPtr<Inspector::TypeBuilder::Console::CallFrame> ScriptCallFrame::buildInspectorObject() const
-{
- return Inspector::TypeBuilder::Console::CallFrame::create()
- .setFunctionName(m_functionName)
- .setUrl(m_scriptName)
- .setLineNumber(m_lineNumber)
- .setColumnNumber(m_column)
- .release();
-}
-#endif
-
-} // namespace WebCore
diff --git a/Source/WebCore/inspector/ScriptCallFrame.h b/Source/WebCore/inspector/ScriptCallFrame.h
deleted file mode 100644
index d6dcfa3..0000000
--- a/Source/WebCore/inspector/ScriptCallFrame.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2010 Google 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:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * 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.
- * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER 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 ScriptCallFrame_h
-#define ScriptCallFrame_h
-
-#if ENABLE(INSPECTOR)
-#include "InspectorWebTypeBuilders.h"
-#endif
-
-#include <wtf/Forward.h>
-#include <wtf/text/WTFString.h>
-
-namespace Inspector {
-class InspectorObject;
-}
-
-namespace WebCore {
-
-class ScriptCallFrame {
-public:
- ScriptCallFrame(const String& functionName, const String& scriptName, unsigned lineNumber, unsigned column);
- ~ScriptCallFrame();
-
- const String& functionName() const { return m_functionName; }
- const String& sourceURL() const { return m_scriptName; }
- unsigned lineNumber() const { return m_lineNumber; }
- unsigned columnNumber() const { return m_column; }
-
- bool isEqual(const ScriptCallFrame&) const;
-
-#if ENABLE(INSPECTOR)
- PassRefPtr<Inspector::TypeBuilder::Console::CallFrame> buildInspectorObject() const;
-#endif
-
-private:
- String m_functionName;
- String m_scriptName;
- unsigned m_lineNumber;
- unsigned m_column;
-};
-
-} // namespace WebCore
-
-#endif // ScriptCallFrame_h
diff --git a/Source/WebCore/inspector/ScriptCallStack.cpp b/Source/WebCore/inspector/ScriptCallStack.cpp
deleted file mode 100644
index c4af1b4..0000000
--- a/Source/WebCore/inspector/ScriptCallStack.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2008, Google 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:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * 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.
- * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER 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 "ScriptCallStack.h"
-
-#include "InspectorWebTypeBuilders.h"
-#include <inspector/InspectorValues.h>
-
-using namespace Inspector;
-
-namespace WebCore {
-
-PassRefPtr<ScriptCallStack> ScriptCallStack::create(Vector<ScriptCallFrame>& frames)
-{
- return adoptRef(new ScriptCallStack(frames));
-}
-
-ScriptCallStack::ScriptCallStack(Vector<ScriptCallFrame>& frames)
-{
- m_frames.swap(frames);
-}
-
-ScriptCallStack::~ScriptCallStack()
-{
-}
-
-const ScriptCallFrame &ScriptCallStack::at(size_t index) const
-{
- ASSERT(m_frames.size() > index);
- return m_frames[index];
-}
-
-size_t ScriptCallStack::size() const
-{
- return m_frames.size();
-}
-
-bool ScriptCallStack::isEqual(ScriptCallStack* o) const
-{
- if (!o)
- return false;
-
- size_t frameCount = o->m_frames.size();
- if (frameCount != m_frames.size())
- return false;
-
- for (size_t i = 0; i < frameCount; ++i) {
- if (!m_frames[i].isEqual(o->m_frames[i]))
- return false;
- }
-
- return true;
-}
-
-#if ENABLE(INSPECTOR)
-PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Console::CallFrame>> ScriptCallStack::buildInspectorArray() const
-{
- RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Console::CallFrame>> frames = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Console::CallFrame>::create();
- for (size_t i = 0; i < m_frames.size(); i++)
- frames->addItem(m_frames.at(i).buildInspectorObject());
- return frames;
-}
-#endif
-
-} // namespace WebCore
diff --git a/Source/WebCore/inspector/ScriptCallStack.h b/Source/WebCore/inspector/ScriptCallStack.h
deleted file mode 100644
index 1975da5c..0000000
--- a/Source/WebCore/inspector/ScriptCallStack.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2008, 2010 Google 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:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * 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.
- * * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER 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 ScriptCallStack_h
-#define ScriptCallStack_h
-
-#if ENABLE(INSPECTOR)
-#include "InspectorWebTypeBuilders.h"
-#endif
-
-#include "ScriptCallFrame.h"
-#include <wtf/Forward.h>
-#include <wtf/RefCounted.h>
-#include <wtf/Vector.h>
-
-namespace WebCore {
-
-class ScriptCallStack : public RefCounted<ScriptCallStack> {
-public:
- static const size_t maxCallStackSizeToCapture = 200;
-
- static PassRefPtr<ScriptCallStack> create(Vector<ScriptCallFrame>&);
-
- ~ScriptCallStack();
-
- const ScriptCallFrame &at(size_t) const;
- size_t size() const;
-
- bool isEqual(ScriptCallStack*) const;
-
-#if ENABLE(INSPECTOR)
- PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Console::CallFrame>> buildInspectorArray() const;
-#endif
-
-private:
- ScriptCallStack(Vector<ScriptCallFrame>&);
-
- Vector<ScriptCallFrame> m_frames;
-};
-
-} // namespace WebCore
-
-#endif // ScriptCallStack_h
diff --git a/Source/WebCore/inspector/TimelineRecordFactory.cpp b/Source/WebCore/inspector/TimelineRecordFactory.cpp
index 17593b8..d9da743 100644
--- a/Source/WebCore/inspector/TimelineRecordFactory.cpp
+++ b/Source/WebCore/inspector/TimelineRecordFactory.cpp
@@ -37,13 +37,14 @@
#include "Event.h"
#include "FloatQuad.h"
#include "IntRect.h"
+#include "JSMainThreadExecState.h"
#include "LayoutRect.h"
#include "ResourceRequest.h"
#include "ResourceResponse.h"
-#include "ScriptCallStack.h"
-#include "ScriptCallStackFactory.h"
#include "ScriptProfile.h"
#include <inspector/InspectorValues.h>
+#include <inspector/ScriptCallStack.h>
+#include <inspector/ScriptCallStackFactory.h>
#include <wtf/CurrentTime.h>
using namespace Inspector;
@@ -56,7 +57,7 @@
record->setNumber("startTime", startTime);
if (maxCallStackDepth) {
- RefPtr<ScriptCallStack> stackTrace = createScriptCallStack(maxCallStackDepth, true);
+ RefPtr<ScriptCallStack> stackTrace = createScriptCallStack(JSMainThreadExecState::currentState(), maxCallStackDepth, true);
if (stackTrace && stackTrace->size())
record->setValue("stackTrace", stackTrace->buildInspectorArray());
}
diff --git a/Source/WebCore/inspector/WebConsoleAgent.cpp b/Source/WebCore/inspector/WebConsoleAgent.cpp
new file mode 100644
index 0000000..b070d4f
--- /dev/null
+++ b/Source/WebCore/inspector/WebConsoleAgent.cpp
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2011 Google 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. 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 INC. 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 "WebConsoleAgent.h"
+
+#if ENABLE(INSPECTOR)
+
+#include "CommandLineAPIHost.h"
+#include "Console.h"
+#include "DOMWindow.h"
+#include "PageInjectedScriptManager.h"
+#include "ResourceError.h"
+#include "ResourceResponse.h"
+#include "ScriptProfiler.h"
+#include "ScriptState.h"
+#include <inspector/ConsoleMessage.h>
+
+using namespace Inspector;
+
+namespace WebCore {
+
+WebConsoleAgent::WebConsoleAgent(PageInjectedScriptManager* injectedScriptManager)
+ : InspectorConsoleAgent(injectedScriptManager)
+ , m_monitoringXHREnabled(false)
+{
+}
+
+void WebConsoleAgent::setMonitoringXHREnabled(ErrorString*, bool enabled)
+{
+ m_monitoringXHREnabled = enabled;
+}
+
+void WebConsoleAgent::frameWindowDiscarded(DOMWindow* window)
+{
+ size_t messageCount = m_consoleMessages.size();
+ for (size_t i = 0; i < messageCount; ++i) {
+ JSC::ExecState* exec = m_consoleMessages[i]->scriptState();
+ if (!exec)
+ continue;
+ if (domWindowFromExecState(exec) != window)
+ continue;
+ m_consoleMessages[i]->clear();
+ }
+
+ static_cast<PageInjectedScriptManager*>(m_injectedScriptManager)->discardInjectedScriptsFor(window);
+}
+
+void WebConsoleAgent::didFinishXHRLoading(unsigned long requestIdentifier, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber)
+{
+ if (!m_injectedScriptManager->inspectorEnvironment().developerExtrasEnabled())
+ return;
+
+ if (m_frontendDispatcher && m_monitoringXHREnabled) {
+ String message = "XHR finished loading: \"" + url + "\".";
+ addMessageToConsole(MessageSource::Network, MessageType::Log, MessageLevel::Debug, message, sendURL, sendLineNumber, sendColumnNumber, nullptr, requestIdentifier);
+ }
+}
+
+void WebConsoleAgent::didReceiveResponse(unsigned long requestIdentifier, const ResourceResponse& response)
+{
+ if (!m_injectedScriptManager->inspectorEnvironment().developerExtrasEnabled())
+ return;
+
+ if (response.httpStatusCode() >= 400) {
+ String message = "Failed to load resource: the server responded with a status of " + String::number(response.httpStatusCode()) + " (" + response.httpStatusText() + ')';
+ addMessageToConsole(MessageSource::Network, MessageType::Log, MessageLevel::Error, message, response.url().string(), 0, 0, nullptr, requestIdentifier);
+ }
+}
+
+void WebConsoleAgent::didFailLoading(unsigned long requestIdentifier, const ResourceError& error)
+{
+ if (!m_injectedScriptManager->inspectorEnvironment().developerExtrasEnabled())
+ return;
+
+ // Report failures only.
+ if (error.isCancellation())
+ return;
+
+ StringBuilder message;
+ message.appendLiteral("Failed to load resource");
+ if (!error.localizedDescription().isEmpty()) {
+ message.appendLiteral(": ");
+ message.append(error.localizedDescription());
+ }
+
+ addMessageToConsole(MessageSource::Network, MessageType::Log, MessageLevel::Error, message.toString(), error.failingURL(), 0, 0, nullptr, requestIdentifier);
+}
+
+class InspectableHeapObject final : public CommandLineAPIHost::InspectableObject {
+public:
+ explicit InspectableHeapObject(int heapObjectId)
+ : m_heapObjectId(heapObjectId)
+ {
+ }
+
+ virtual Deprecated::ScriptValue get(JSC::ExecState*) override
+ {
+ return ScriptProfiler::objectByHeapObjectId(m_heapObjectId);
+ }
+
+private:
+ int m_heapObjectId;
+};
+
+void WebConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId)
+{
+ if (CommandLineAPIHost* commandLineAPIHost = static_cast<PageInjectedScriptManager*>(m_injectedScriptManager)->commandLineAPIHost())
+ commandLineAPIHost->addInspectedObject(adoptPtr(new InspectableHeapObject(inspectedHeapObjectId)));
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INSPECTOR)
diff --git a/Source/WebCore/inspector/WebConsoleAgent.h b/Source/WebCore/inspector/WebConsoleAgent.h
new file mode 100644
index 0000000..4debfec
--- /dev/null
+++ b/Source/WebCore/inspector/WebConsoleAgent.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2011 Google 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. 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 INC. 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 WebConsoleAgent_h
+#define WebConsoleAgent_h
+
+#if ENABLE(INSPECTOR)
+
+#include <inspector/agents/InspectorConsoleAgent.h>
+
+namespace WebCore {
+
+class DOMWindow;
+class PageInjectedScriptManager;
+class ResourceError;
+class ResourceResponse;
+typedef String ErrorString;
+
+class WebConsoleAgent : public Inspector::InspectorConsoleAgent {
+ WTF_MAKE_NONCOPYABLE(WebConsoleAgent);
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ WebConsoleAgent(PageInjectedScriptManager*);
+ virtual ~WebConsoleAgent() { }
+
+ virtual void setMonitoringXHREnabled(ErrorString*, bool enabled) override final;
+ virtual void addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId) override final;
+
+ void frameWindowDiscarded(DOMWindow*);
+
+ void didFinishXHRLoading(unsigned long requestIdentifier, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber);
+ void didReceiveResponse(unsigned long requestIdentifier, const ResourceResponse&);
+ void didFailLoading(unsigned long requestIdentifier, const ResourceError&);
+
+protected:
+ bool m_monitoringXHREnabled;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INSPECTOR)
+
+#endif // !defined(WebConsoleAgent_h)
diff --git a/Source/WebCore/inspector/WorkerConsoleAgent.cpp b/Source/WebCore/inspector/WorkerConsoleAgent.cpp
index 9f1056d..258a8db 100644
--- a/Source/WebCore/inspector/WorkerConsoleAgent.cpp
+++ b/Source/WebCore/inspector/WorkerConsoleAgent.cpp
@@ -38,18 +38,14 @@
namespace WebCore {
-WorkerConsoleAgent::WorkerConsoleAgent(InstrumentingAgents* instrumentingAgents, PageInjectedScriptManager* injectedScriptManager)
- : InspectorConsoleAgent(instrumentingAgents, injectedScriptManager)
-{
-}
-
-WorkerConsoleAgent::~WorkerConsoleAgent()
+WorkerConsoleAgent::WorkerConsoleAgent(PageInjectedScriptManager* injectedScriptManager)
+ : WebConsoleAgent(injectedScriptManager)
{
}
void WorkerConsoleAgent::addInspectedNode(ErrorString* error, int)
{
- *error = "addInspectedNode is not supported for workers";
+ *error = ASCIILiteral("addInspectedNode is not supported for workers");
}
} // namespace WebCore
diff --git a/Source/WebCore/inspector/WorkerConsoleAgent.h b/Source/WebCore/inspector/WorkerConsoleAgent.h
index 99ad562..876a6cb 100644
--- a/Source/WebCore/inspector/WorkerConsoleAgent.h
+++ b/Source/WebCore/inspector/WorkerConsoleAgent.h
@@ -31,20 +31,20 @@
#ifndef WorkerConsoleAgent_h
#define WorkerConsoleAgent_h
-#include "InspectorConsoleAgent.h"
-#include <wtf/PassOwnPtr.h>
+#include "WebConsoleAgent.h"
#if ENABLE(INSPECTOR)
namespace WebCore {
-class WorkerConsoleAgent : public InspectorConsoleAgent {
+class WorkerConsoleAgent final : public WebConsoleAgent {
WTF_MAKE_NONCOPYABLE(WorkerConsoleAgent);
+ WTF_MAKE_FAST_ALLOCATED;
public:
- WorkerConsoleAgent(InstrumentingAgents*, PageInjectedScriptManager*);
- virtual ~WorkerConsoleAgent();
+ WorkerConsoleAgent(PageInjectedScriptManager*);
+ virtual ~WorkerConsoleAgent() { }
- virtual bool isWorkerAgent() override { return true; }
+ virtual bool isWorkerAgent() const override { return true; }
private:
virtual void addInspectedNode(ErrorString*, int nodeId) override;
diff --git a/Source/WebCore/inspector/WorkerDebuggerAgent.cpp b/Source/WebCore/inspector/WorkerDebuggerAgent.cpp
index 5053a4c..a71efe6 100644
--- a/Source/WebCore/inspector/WorkerDebuggerAgent.cpp
+++ b/Source/WebCore/inspector/WorkerDebuggerAgent.cpp
@@ -129,7 +129,7 @@
void WorkerDebuggerAgent::breakpointActionLog(JSC::ExecState*, const String& message)
{
- m_inspectedWorkerGlobalScope->addConsoleMessage(JSMessageSource, LogMessageLevel, message);
+ m_inspectedWorkerGlobalScope->addConsoleMessage(MessageSource::JS, MessageLevel::Log, message);
}
WorkerScriptDebugServer& WorkerDebuggerAgent::scriptDebugServer()
diff --git a/Source/WebCore/inspector/WorkerInspectorController.cpp b/Source/WebCore/inspector/WorkerInspectorController.cpp
index d0a9f5a..7c015a8 100644
--- a/Source/WebCore/inspector/WorkerInspectorController.cpp
+++ b/Source/WebCore/inspector/WorkerInspectorController.cpp
@@ -36,7 +36,6 @@
#include "CommandLineAPIHost.h"
#include "InspectorClient.h"
-#include "InspectorConsoleAgent.h"
#include "InspectorForwarding.h"
#include "InspectorHeapProfilerAgent.h"
#include "InspectorInstrumentation.h"
@@ -90,7 +89,9 @@
m_instrumentingAgents->setWorkerRuntimeAgent(m_runtimeAgent);
m_agents.append(std::move(runtimeAgent));
- auto consoleAgent = std::make_unique<WorkerConsoleAgent>(m_instrumentingAgents.get(), m_injectedScriptManager.get());
+ auto consoleAgent = std::make_unique<WorkerConsoleAgent>(m_injectedScriptManager.get());
+ m_instrumentingAgents->setWebConsoleAgent(consoleAgent.get());
+
auto debuggerAgent = std::make_unique<WorkerDebuggerAgent>(m_injectedScriptManager.get(), m_instrumentingAgents.get(), &workerGlobalScope);
m_runtimeAgent->setScriptDebugServer(&debuggerAgent->scriptDebugServer());
m_agents.append(std::move(debuggerAgent));
diff --git a/Source/WebCore/inspector/protocol/Console.json b/Source/WebCore/inspector/protocol/Console.json
deleted file mode 100644
index 35bd11a..0000000
--- a/Source/WebCore/inspector/protocol/Console.json
+++ /dev/null
@@ -1,95 +0,0 @@
-{
- "domain": "Console",
- "description": "Console domain defines methods and events for interaction with the JavaScript console. Console collects messages created by means of the <a href='http://getfirebug.com/wiki/index.php/Console_API'>JavaScript Console API</a>. One needs to enable this domain using <code>enable</code> command in order to start receiving the console messages. Browser collects messages issued while console domain is not enabled as well and reports them using <code>messageAdded</code> notification upon enabling.",
- "types": [
- {
- "id": "ConsoleMessage",
- "type": "object",
- "description": "Console message.",
- "properties": [
- { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "css", "security", "other"], "description": "Message source." },
- { "name": "level", "type": "string", "enum": ["log", "warning", "error", "debug"], "description": "Message severity." },
- { "name": "text", "type": "string", "description": "Message text." },
- { "name": "type", "type": "string", "optional": true, "enum": ["log", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "timing", "profile", "profileEnd"], "description": "Console message type." },
- { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." },
- { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." },
- { "name": "column", "type": "integer", "optional": true, "description": "Column number on the line in the resource that generated this message." },
- { "name": "repeatCount", "type": "integer", "optional": true, "description": "Repeat count for repeated messages." },
- { "name": "parameters", "type": "array", "items": { "$ref": "Runtime.RemoteObject" }, "optional": true, "description": "Message parameters in case of the formatted message." },
- { "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "JavaScript stack trace for assertions and error messages." },
- { "name": "networkRequestId", "$ref": "Network.RequestId", "optional": true, "description": "Identifier of the network request associated with this message." }
- ]
- },
- {
- "id": "CallFrame",
- "type": "object",
- "description": "Stack entry for console errors and assertions.",
- "properties": [
- { "name": "functionName", "type": "string", "description": "JavaScript function name." },
- { "name": "url", "type": "string", "description": "JavaScript script name or url." },
- { "name": "lineNumber", "type": "integer", "description": "JavaScript script line number." },
- { "name": "columnNumber", "type": "integer", "description": "JavaScript script column number." }
- ]
- },
- {
- "id": "StackTrace",
- "type": "array",
- "items": { "$ref": "CallFrame" },
- "description": "Call frames for assertions or error messages."
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification."
- },
- {
- "name": "disable",
- "description": "Disables console domain, prevents further console messages from being reported to the client."
- },
- {
- "name": "clearMessages",
- "description": "Clears console messages collected in the browser."
- },
- {
- "name": "setMonitoringXHREnabled",
- "parameters": [
- { "name": "enabled", "type": "boolean", "description": "Monitoring enabled state." }
- ],
- "description": "Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued."
- },
- {
- "name": "addInspectedNode",
- "parameters": [
- { "name": "nodeId", "$ref": "DOM.NodeId", "description": "DOM node id to be accessible by means of $x command line API." }
- ],
- "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions)."
- },
- {
- "name": "addInspectedHeapObject",
- "parameters": [
- { "name": "heapObjectId", "type": "integer" }
- ]
- }
- ],
- "events": [
- {
- "name": "messageAdded",
- "parameters": [
- { "name": "message", "$ref": "ConsoleMessage", "description": "Console message that has been added." }
- ],
- "description": "Issued when new console message is added."
- },
- {
- "name": "messageRepeatCountUpdated",
- "parameters": [
- { "name": "count", "type": "integer", "description": "New repeat count value." }
- ],
- "description": "Issued when subsequent message(s) are equal to the previous one(s)."
- },
- {
- "name": "messagesCleared",
- "description": "Issued when console is cleared. This happens either upon <code>clearMessages</code> command or after page navigation."
- }
- ]
-}
diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp
index ff556c5..b04a4e7 100644
--- a/Source/WebCore/loader/DocumentLoader.cpp
+++ b/Source/WebCore/loader/DocumentLoader.cpp
@@ -614,7 +614,7 @@
if (frameLoader()->shouldInterruptLoadForXFrameOptions(content, response.url(), identifier)) {
InspectorInstrumentation::continueAfterXFrameOptionsDenied(m_frame, this, identifier, response);
String message = "Refused to display '" + response.url().stringCenterEllipsizedToLength() + "' in a frame because it set 'X-Frame-Options' to '" + content + "'.";
- frame()->document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message, identifier);
+ frame()->document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, message, identifier);
frame()->document()->enforceSandboxFlags(SandboxOrigin);
if (HTMLFrameOwnerElement* ownerElement = frame()->ownerElement())
ownerElement->dispatchEvent(Event::create(eventNames().loadEvent, false, false));
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp
index b1a7e09..0fdee6f 100644
--- a/Source/WebCore/loader/FrameLoader.cpp
+++ b/Source/WebCore/loader/FrameLoader.cpp
@@ -102,7 +102,6 @@
#include "SVGViewElement.h"
#include "SVGViewSpec.h"
#include "SchemeRegistry.h"
-#include "ScriptCallStack.h"
#include "ScriptController.h"
#include "ScriptSourceCode.h"
#include "ScrollAnimator.h"
@@ -370,7 +369,7 @@
if (isDocumentSandboxed(&m_frame, SandboxForms)) {
// FIXME: This message should be moved off the console once a solution to https://bugs.webkit.org/show_bug.cgi?id=103274 exists.
- m_frame.document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Blocked form submission to '" + submission->action().stringCenterEllipsizedToLength() + "' because the form's frame is sandboxed and the 'allow-forms' permission is not set.");
+ m_frame.document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Blocked form submission to '" + submission->action().stringCenterEllipsizedToLength() + "' because the form's frame is sandboxed and the 'allow-forms' permission is not set.");
return;
}
@@ -1479,7 +1478,7 @@
if (!frame)
return;
- frame->document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Not allowed to load local resource: " + url);
+ frame->document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Not allowed to load local resource: " + url);
}
const ResourceRequest& FrameLoader::initialRequest() const
@@ -2842,7 +2841,7 @@
// If the navigating FrameLoader has already shown a beforeunload confirmation panel for the current navigation attempt,
// this frame is not allowed to cause another one to be shown.
if (frameLoaderBeingNavigated->m_currentNavigationHasShownBeforeUnloadConfirmPanel) {
- document->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Blocked attempt to show multiple beforeunload confirmation dialogs for the same navigation.");
+ document->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Blocked attempt to show multiple beforeunload confirmation dialogs for the same navigation."));
return true;
}
@@ -2855,7 +2854,7 @@
if (!parentDocument)
return true;
if (!m_frame.document() || !m_frame.document()->securityOrigin()->canAccess(parentDocument->securityOrigin())) {
- document->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Blocked attempt to show beforeunload confirmation dialog on behalf of a frame with different security origin. Protocols, domains, and ports must match.");
+ document->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Blocked attempt to show beforeunload confirmation dialog on behalf of a frame with different security origin. Protocols, domains, and ports must match."));
return true;
}
@@ -3065,10 +3064,10 @@
case XFrameOptionsAllowAll:
return false;
case XFrameOptionsConflict:
- m_frame.document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Multiple 'X-Frame-Options' headers with conflicting values ('" + content + "') encountered when loading '" + url.stringCenterEllipsizedToLength() + "'. Falling back to 'DENY'.", requestIdentifier);
+ m_frame.document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "Multiple 'X-Frame-Options' headers with conflicting values ('" + content + "') encountered when loading '" + url.stringCenterEllipsizedToLength() + "'. Falling back to 'DENY'.", requestIdentifier);
return true;
case XFrameOptionsInvalid:
- m_frame.document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Invalid 'X-Frame-Options' header encountered when loading '" + url.stringCenterEllipsizedToLength() + "': '" + content + "' is not a recognized directive. The header will be ignored.", requestIdentifier);
+ m_frame.document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "Invalid 'X-Frame-Options' header encountered when loading '" + url.stringCenterEllipsizedToLength() + "': '" + content + "' is not a recognized directive. The header will be ignored.", requestIdentifier);
return false;
default:
ASSERT_NOT_REACHED();
@@ -3441,7 +3440,7 @@
// Sandboxed frames cannot open new auxiliary browsing contexts.
if (isDocumentSandboxed(openerFrame, SandboxPopups)) {
// FIXME: This message should be moved off the console once a solution to https://bugs.webkit.org/show_bug.cgi?id=103274 exists.
- openerFrame->document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Blocked opening '" + request.resourceRequest().url().stringCenterEllipsizedToLength() + "' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.");
+ openerFrame->document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Blocked opening '" + request.resourceRequest().url().stringCenterEllipsizedToLength() + "' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.");
return 0;
}
diff --git a/Source/WebCore/loader/ImageLoader.cpp b/Source/WebCore/loader/ImageLoader.cpp
index 60ac464..306a1b76 100644
--- a/Source/WebCore/loader/ImageLoader.cpp
+++ b/Source/WebCore/loader/ImageLoader.cpp
@@ -36,7 +36,6 @@
#include "HTMLParserIdioms.h"
#include "RenderImage.h"
#include "RenderSVGImage.h"
-#include "ScriptCallStack.h"
#include "SecurityOrigin.h"
#if ENABLE(VIDEO)
@@ -293,7 +292,7 @@
errorEventSender().dispatchEventSoon(this);
DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Cross-origin image load denied by Cross-Origin Resource Sharing policy.")));
- element().document().addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, consoleMessage);
+ element().document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, consoleMessage);
ASSERT(!m_hasPendingLoadEvent);
diff --git a/Source/WebCore/loader/MixedContentChecker.cpp b/Source/WebCore/loader/MixedContentChecker.cpp
index e507aa6..17f34e0 100644
--- a/Source/WebCore/loader/MixedContentChecker.cpp
+++ b/Source/WebCore/loader/MixedContentChecker.cpp
@@ -94,7 +94,7 @@
void MixedContentChecker::logWarning(bool allowed, const String& action, const URL& target) const
{
String message = makeString((allowed ? "" : "[blocked] "), "The page at ", m_frame.document()->url().stringCenterEllipsizedToLength(), " ", action, " insecure content from ", target.stringCenterEllipsizedToLength(), ".\n");
- m_frame.document()->addConsoleMessage(SecurityMessageSource, WarningMessageLevel, message);
+ m_frame.document()->addConsoleMessage(MessageSource::Security, MessageLevel::Warning, message);
}
} // namespace WebCore
diff --git a/Source/WebCore/loader/TextTrackLoader.cpp b/Source/WebCore/loader/TextTrackLoader.cpp
index 35d788c..5f0ba3b 100644
--- a/Source/WebCore/loader/TextTrackLoader.cpp
+++ b/Source/WebCore/loader/TextTrackLoader.cpp
@@ -36,7 +36,6 @@
#include "Document.h"
#include "Logging.h"
#include "ResourceBuffer.h"
-#include "ScriptCallStack.h"
#include "SecurityOrigin.h"
#include "TextTrackCue.h"
#include "WebVTTParser.h"
@@ -118,7 +117,7 @@
{
DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Cross-origin text track load denied by Cross-Origin Resource Sharing policy.")));
Document* document = toDocument(m_scriptExecutionContext);
- document->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, consoleMessage);
+ document->addConsoleMessage(MessageSource::Security, MessageLevel::Error, consoleMessage);
m_state = Failed;
}
diff --git a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp b/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
index 1763f06..e877182 100644
--- a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
+++ b/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
@@ -20,7 +20,7 @@
* 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.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -471,7 +471,7 @@
if (m_completionType != None)
return;
- frame->document()->addConsoleMessage(NetworkMessageSource, DebugMessageLevel, "Application Cache download process was aborted.");
+ frame->document()->addConsoleMessage(MessageSource::Network, MessageLevel::Debug, ASCIILiteral("Application Cache download process was aborted."));
cacheUpdateFailed();
}
@@ -547,7 +547,7 @@
if (response.httpStatusCode() / 100 != 2 || response.url() != m_currentHandle->firstRequest().url()) {
if ((type & ApplicationCacheResource::Explicit) || (type & ApplicationCacheResource::Fallback)) {
- m_frame->document()->addConsoleMessage(AppCacheMessageSource, ErrorMessageLevel, "Application Cache update failed, because " + m_currentHandle->firstRequest().url().stringCenterEllipsizedToLength() +
+ m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, "Application Cache update failed, because " + m_currentHandle->firstRequest().url().stringCenterEllipsizedToLength() +
((response.httpStatusCode() / 100 != 2) ? " could not be fetched." : " was redirected."));
// Note that cacheUpdateFailed() can cause the cache group to be deleted.
cacheUpdateFailed();
@@ -626,7 +626,7 @@
// FIXME: Should we break earlier and prevent redownloading on later page loads?
if (m_originQuotaExceededPreviously && m_availableSpaceInQuota < m_cacheBeingUpdated->estimatedSizeInStorage()) {
m_currentResource = 0;
- m_frame->document()->addConsoleMessage(AppCacheMessageSource, ErrorMessageLevel, "Application Cache update failed, because size quota was exceeded.");
+ m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, ASCIILiteral("Application Cache update failed, because size quota was exceeded."));
cacheUpdateFailed();
return;
}
@@ -661,7 +661,7 @@
m_pendingEntries.remove(url);
if ((type & ApplicationCacheResource::Explicit) || (type & ApplicationCacheResource::Fallback)) {
- m_frame->document()->addConsoleMessage(AppCacheMessageSource, ErrorMessageLevel, "Application Cache update failed, because " + url.stringCenterEllipsizedToLength() + " could not be fetched.");
+ m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, "Application Cache update failed, because " + url.stringCenterEllipsizedToLength() + " could not be fetched.");
// Note that cacheUpdateFailed() can cause the cache group to be deleted.
cacheUpdateFailed();
} else {
@@ -690,13 +690,13 @@
return;
if (response.httpStatusCode() / 100 != 2) {
- m_frame->document()->addConsoleMessage(OtherMessageSource, ErrorMessageLevel, "Application Cache manifest could not be fetched.");
+ m_frame->document()->addConsoleMessage(MessageSource::Other, MessageLevel::Error, ASCIILiteral("Application Cache manifest could not be fetched."));
cacheUpdateFailed();
return;
}
if (response.url() != m_manifestHandle->firstRequest().url()) {
- m_frame->document()->addConsoleMessage(OtherMessageSource, ErrorMessageLevel, "Application Cache manifest could not be fetched, because a redirection was attempted.");
+ m_frame->document()->addConsoleMessage(MessageSource::Other, MessageLevel::Error, ASCIILiteral("Application Cache manifest could not be fetched, because a redirection was attempted."));
cacheUpdateFailed();
return;
}
@@ -716,7 +716,7 @@
if (!isUpgradeAttempt && !m_manifestResource) {
// The server returned 304 Not Modified even though we didn't send a conditional request.
- m_frame->document()->addConsoleMessage(OtherMessageSource, ErrorMessageLevel, "Application Cache manifest could not be fetched because of an unexpected 304 Not Modified server response.");
+ m_frame->document()->addConsoleMessage(MessageSource::Other, MessageLevel::Error, ASCIILiteral("Application Cache manifest could not be fetched because of an unexpected 304 Not Modified server response."));
cacheUpdateFailed();
return;
}
@@ -742,7 +742,7 @@
Manifest manifest;
if (!parseManifest(m_manifestURL, m_manifestResource->data()->data(), m_manifestResource->data()->size(), manifest)) {
// At the time of this writing, lack of "CACHE MANIFEST" signature is the only reason for parseManifest to fail.
- m_frame->document()->addConsoleMessage(OtherMessageSource, ErrorMessageLevel, "Application Cache manifest could not be parsed. Does it start with CACHE MANIFEST?");
+ m_frame->document()->addConsoleMessage(MessageSource::Other, MessageLevel::Error, ASCIILiteral("Application Cache manifest could not be parsed. Does it start with CACHE MANIFEST?"));
cacheUpdateFailed();
return;
}
@@ -929,7 +929,7 @@
// We ran out of space for this origin. Fall down to the normal error handling
// after recording this state.
m_originQuotaExceededPreviously = true;
- m_frame->document()->addConsoleMessage(OtherMessageSource, ErrorMessageLevel, "Application Cache update failed, because size quota was exceeded.");
+ m_frame->document()->addConsoleMessage(MessageSource::Other, MessageLevel::Error, ASCIILiteral("Application Cache update failed, because size quota was exceeded."));
}
if (failureReason == ApplicationCacheStorage::TotalQuotaReached && !m_calledReachedMaxAppCacheSize) {
diff --git a/Source/WebCore/loader/cache/CachedResourceLoader.cpp b/Source/WebCore/loader/cache/CachedResourceLoader.cpp
index cc70b53..61e6018 100644
--- a/Source/WebCore/loader/cache/CachedResourceLoader.cpp
+++ b/Source/WebCore/loader/cache/CachedResourceLoader.cpp
@@ -632,7 +632,7 @@
else
message = "Unsafe attempt to load URL " + url.stringCenterEllipsizedToLength() + " from frame with URL " + m_document->url().stringCenterEllipsizedToLength() + ". Domains, protocols and ports must match.\n";
- frame()->document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message);
+ frame()->document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, message);
}
void CachedResourceLoader::setAutoLoadImages(bool enable)
diff --git a/Source/WebCore/page/ChromeClient.h b/Source/WebCore/page/ChromeClient.h
index 218cdd5..ee142c8 100644
--- a/Source/WebCore/page/ChromeClient.h
+++ b/Source/WebCore/page/ChromeClient.h
@@ -23,8 +23,6 @@
#define ChromeClient_h
#include "AXObjectCache.h"
-#include "ConsoleAPITypes.h"
-#include "ConsoleTypes.h"
#include "Cursor.h"
#include "FocusDirection.h"
#include "FrameLoader.h"
@@ -37,6 +35,7 @@
#include "ScrollingCoordinator.h"
#include "SearchPopupMenu.h"
#include "WebCoreKeyboardUIMode.h"
+#include <inspector/ConsoleTypes.h>
#include <wtf/Forward.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/Vector.h>
diff --git a/Source/WebCore/page/Console.cpp b/Source/WebCore/page/Console.cpp
index e21b862..e73a6ed 100644
--- a/Source/WebCore/page/Console.cpp
+++ b/Source/WebCore/page/Console.cpp
@@ -31,8 +31,6 @@
#include "Chrome.h"
#include "ChromeClient.h"
-#include "ConsoleAPITypes.h"
-#include "ConsoleTypes.h"
#include "Document.h"
#include "Frame.h"
#include "FrameLoader.h"
@@ -42,18 +40,21 @@
#include "Page.h"
#include "PageConsole.h"
#include "PageGroup.h"
-#include "ScriptArguments.h"
-#include "ScriptCallStack.h"
-#include "ScriptCallStackFactory.h"
#include "ScriptProfile.h"
#include "ScriptProfiler.h"
#include "ScriptableDocumentParser.h"
#include "Settings.h"
#include <bindings/ScriptValue.h>
+#include <inspector/ConsoleTypes.h>
+#include <inspector/ScriptArguments.h>
+#include <inspector/ScriptCallStack.h>
+#include <inspector/ScriptCallStackFactory.h>
#include <stdio.h>
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
+using namespace Inspector;
+
namespace WebCore {
Console::Console(Frame* frame)
@@ -81,13 +82,13 @@
String message;
bool gotMessage = arguments->getFirstArgumentAsString(message);
- InspectorInstrumentation::addMessageToConsole(page, ConsoleAPIMessageSource, type, level, message, state, arguments);
+ InspectorInstrumentation::addMessageToConsole(page, MessageSource::ConsoleAPI, type, level, message, state, arguments);
if (page->settings().privateBrowsingEnabled())
return;
if (gotMessage)
- page->chrome().client().addMessageToConsole(ConsoleAPIMessageSource, type, level, message, lastCaller.lineNumber(), lastCaller.columnNumber(), lastCaller.sourceURL());
+ page->chrome().client().addMessageToConsole(MessageSource::ConsoleAPI, type, level, message, lastCaller.lineNumber(), lastCaller.columnNumber(), lastCaller.sourceURL());
if (!page->settings().logsPageMessagesToSystemConsoleEnabled() && !PageConsole::shouldPrintExceptions())
return;
@@ -96,7 +97,7 @@
printf(": ");
- PageConsole::printMessageSourceAndLevelPrefix(ConsoleAPIMessageSource, level, printTrace);
+ PageConsole::printMessageSourceAndLevelPrefix(MessageSource::ConsoleAPI, level, printTrace);
for (size_t i = 0; i < arguments->argumentCount(); ++i) {
String argAsString = arguments->argumentAt(i).toString(arguments->globalState());
@@ -125,12 +126,12 @@
void Console::debug(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
{
- internalAddMessage(page(), LogMessageType, DebugMessageLevel, state, arguments);
+ internalAddMessage(page(), MessageType::Log, MessageLevel::Debug, state, arguments);
}
void Console::error(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
{
- internalAddMessage(page(), LogMessageType, ErrorMessageLevel, state, arguments);
+ internalAddMessage(page(), MessageType::Log, MessageLevel::Error, state, arguments);
}
void Console::info(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
@@ -140,37 +141,37 @@
void Console::log(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
{
- internalAddMessage(page(), LogMessageType, LogMessageLevel, state, arguments);
+ internalAddMessage(page(), MessageType::Log, MessageLevel::Log, state, arguments);
}
void Console::warn(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
{
- internalAddMessage(page(), LogMessageType, WarningMessageLevel, state, arguments);
+ internalAddMessage(page(), MessageType::Log, MessageLevel::Warning, state, arguments);
}
void Console::dir(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
{
- internalAddMessage(page(), DirMessageType, LogMessageLevel, state, arguments);
+ internalAddMessage(page(), MessageType::Dir, MessageLevel::Log, state, arguments);
}
void Console::dirxml(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
{
- internalAddMessage(page(), DirXMLMessageType, LogMessageLevel, state, arguments);
+ internalAddMessage(page(), MessageType::DirXML, MessageLevel::Log, state, arguments);
}
void Console::table(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
{
- internalAddMessage(page(), TableMessageType, LogMessageLevel, state, arguments);
+ internalAddMessage(page(), MessageType::Table, MessageLevel::Log, state, arguments);
}
void Console::clear(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
{
- internalAddMessage(page(), ClearMessageType, LogMessageLevel, state, arguments, true);
+ internalAddMessage(page(), MessageType::Clear, MessageLevel::Log, state, arguments, true);
}
void Console::trace(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
{
- internalAddMessage(page(), TraceMessageType, LogMessageLevel, state, arguments, true, true);
+ internalAddMessage(page(), MessageType::Trace, MessageLevel::Log, state, arguments, true, true);
}
void Console::assertCondition(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments, bool condition)
@@ -178,7 +179,7 @@
if (condition)
return;
- internalAddMessage(page(), AssertMessageType, ErrorMessageLevel, state, arguments, true);
+ internalAddMessage(page(), MessageType::Assert, MessageLevel::Error, state, arguments, true);
}
void Console::count(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
@@ -243,17 +244,17 @@
void Console::group(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
{
- InspectorInstrumentation::addMessageToConsole(page(), ConsoleAPIMessageSource, StartGroupMessageType, LogMessageLevel, String(), state, arguments);
+ InspectorInstrumentation::addMessageToConsole(page(), MessageSource::ConsoleAPI, MessageType::StartGroup, MessageLevel::Log, String(), state, arguments);
}
void Console::groupCollapsed(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
{
- InspectorInstrumentation::addMessageToConsole(page(), ConsoleAPIMessageSource, StartGroupCollapsedMessageType, LogMessageLevel, String(), state, arguments);
+ InspectorInstrumentation::addMessageToConsole(page(), MessageSource::ConsoleAPI, MessageType::StartGroupCollapsed, MessageLevel::Log, String(), state, arguments);
}
void Console::groupEnd()
{
- InspectorInstrumentation::addMessageToConsole(page(), ConsoleAPIMessageSource, EndGroupMessageType, LogMessageLevel, String(), String(), 0, 0);
+ InspectorInstrumentation::addMessageToConsole(page(), MessageSource::ConsoleAPI, MessageType::EndGroup, MessageLevel::Log, String(), String(), 0, 0);
}
Page* Console::page() const
diff --git a/Source/WebCore/page/Console.h b/Source/WebCore/page/Console.h
index 64eac1a..98e4b47 100644
--- a/Source/WebCore/page/Console.h
+++ b/Source/WebCore/page/Console.h
@@ -37,11 +37,14 @@
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
+namespace Inspector {
+class ScriptArguments;
+}
+
namespace WebCore {
class Frame;
class Page;
-class ScriptArguments;
typedef Vector<RefPtr<ScriptProfile>> ProfilesArray;
@@ -50,26 +53,26 @@
static PassRefPtr<Console> create(Frame* frame) { return adoptRef(new Console(frame)); }
virtual ~Console();
- void debug(JSC::ExecState*, PassRefPtr<ScriptArguments>);
- void error(JSC::ExecState*, PassRefPtr<ScriptArguments>);
- void info(JSC::ExecState*, PassRefPtr<ScriptArguments>);
- void log(JSC::ExecState*, PassRefPtr<ScriptArguments>);
- void clear(JSC::ExecState*, PassRefPtr<ScriptArguments>);
- void warn(JSC::ExecState*, PassRefPtr<ScriptArguments>);
- void dir(JSC::ExecState*, PassRefPtr<ScriptArguments>);
- void dirxml(JSC::ExecState*, PassRefPtr<ScriptArguments>);
- void table(JSC::ExecState*, PassRefPtr<ScriptArguments>);
- void trace(JSC::ExecState*, PassRefPtr<ScriptArguments>);
- void assertCondition(JSC::ExecState*, PassRefPtr<ScriptArguments>, bool condition);
- void count(JSC::ExecState*, PassRefPtr<ScriptArguments>);
+ void debug(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>);
+ void error(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>);
+ void info(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>);
+ void log(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>);
+ void clear(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>);
+ void warn(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>);
+ void dir(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>);
+ void dirxml(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>);
+ void table(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>);
+ void trace(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>);
+ void assertCondition(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>, bool condition);
+ void count(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>);
const ProfilesArray& profiles() const { return m_profiles; }
void profile(JSC::ExecState*, const String& = String());
void profileEnd(JSC::ExecState*, const String& = String());
void time(const String&);
void timeEnd(JSC::ExecState*, const String&);
- void timeStamp(PassRefPtr<ScriptArguments>);
- void group(JSC::ExecState*, PassRefPtr<ScriptArguments>);
- void groupCollapsed(JSC::ExecState*, PassRefPtr<ScriptArguments>);
+ void timeStamp(PassRefPtr<Inspector::ScriptArguments>);
+ void group(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>);
+ void groupCollapsed(JSC::ExecState*, PassRefPtr<Inspector::ScriptArguments>);
void groupEnd();
private:
diff --git a/Source/WebCore/page/ConsoleTypes.h b/Source/WebCore/page/ConsoleTypes.h
deleted file mode 100644
index 804a167..0000000
--- a/Source/WebCore/page/ConsoleTypes.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2011 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. 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 INC. 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 ConsoleTypes_h
-#define ConsoleTypes_h
-
-namespace WebCore {
-
-enum MessageSource {
- XMLMessageSource,
- JSMessageSource,
- NetworkMessageSource,
- ConsoleAPIMessageSource,
- StorageMessageSource,
- AppCacheMessageSource,
- RenderingMessageSource,
- CSSMessageSource,
- SecurityMessageSource,
- OtherMessageSource,
-};
-
-enum MessageLevel {
- DebugMessageLevel = 4,
- LogMessageLevel = 1,
- WarningMessageLevel = 2,
- ErrorMessageLevel = 3
-};
-
-} // namespace WebCore
-
-#endif // ConsoleTypes_h
diff --git a/Source/WebCore/page/ContentSecurityPolicy.cpp b/Source/WebCore/page/ContentSecurityPolicy.cpp
index 0aea9aa..927c085 100644
--- a/Source/WebCore/page/ContentSecurityPolicy.cpp
+++ b/Source/WebCore/page/ContentSecurityPolicy.cpp
@@ -35,17 +35,18 @@
#include "FormDataList.h"
#include "Frame.h"
#include "InspectorInstrumentation.h"
-#include "URL.h"
+#include "JSMainThreadExecState.h"
#include "PingLoader.h"
#include "RuntimeEnabledFeatures.h"
#include "SchemeRegistry.h"
-#include "ScriptCallStack.h"
-#include "ScriptCallStackFactory.h"
#include "ScriptState.h"
#include "SecurityOrigin.h"
#include "SecurityPolicyViolationEvent.h"
#include "TextEncoding.h"
+#include "URL.h"
#include <inspector/InspectorValues.h>
+#include <inspector/ScriptCallStack.h>
+#include <inspector/ScriptCallStackFactory.h>
#include <wtf/HashSet.h>
#include <wtf/text/TextPosition.h>
#include <wtf/text/WTFString.h>
@@ -1726,7 +1727,7 @@
init.sourceFile = String();
init.lineNumber = 0;
- RefPtr<ScriptCallStack> stack = createScriptCallStack(2, false);
+ RefPtr<ScriptCallStack> stack = createScriptCallStack(JSMainThreadExecState::currentState(), 2, false);
if (!stack)
return;
@@ -1788,7 +1789,7 @@
cspReport->setString("original-policy", header);
cspReport->setString("blocked-uri", stripURLForUseInReport(document, blockedURL));
- RefPtr<ScriptCallStack> stack = createScriptCallStack(2, false);
+ RefPtr<ScriptCallStack> stack = createScriptCallStack(JSMainThreadExecState::currentState(), 2, false);
if (stack) {
const ScriptCallFrame& callFrame = getFirstNonNativeFrame(stack);
@@ -1899,7 +1900,7 @@
void ContentSecurityPolicy::logToConsole(const String& message, const String& contextURL, const WTF::OrdinalNumber& contextLine, JSC::ExecState* state) const
{
// FIXME: <http://webkit.org/b/114317> ContentSecurityPolicy::logToConsole should include a column number
- m_scriptExecutionContext->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message, contextURL, contextLine.oneBasedInt(), 0, state);
+ m_scriptExecutionContext->addConsoleMessage(MessageSource::Security, MessageLevel::Error, message, contextURL, contextLine.oneBasedInt(), 0, state);
}
void ContentSecurityPolicy::reportBlockedScriptExecutionToInspector(const String& directiveText) const
diff --git a/Source/WebCore/page/DOMSecurityPolicy.cpp b/Source/WebCore/page/DOMSecurityPolicy.cpp
index 7a264ee..994c96c 100644
--- a/Source/WebCore/page/DOMSecurityPolicy.cpp
+++ b/Source/WebCore/page/DOMSecurityPolicy.cpp
@@ -30,7 +30,6 @@
#include "ContextDestructionObserver.h"
#include "DOMStringList.h"
#include "Frame.h"
-#include "ScriptCallStack.h"
#include "ScriptExecutionContext.h"
#include <wtf/text/TextPosition.h>
#include <wtf/text/WTFString.h>
diff --git a/Source/WebCore/page/DOMWindow.cpp b/Source/WebCore/page/DOMWindow.cpp
index 7533b00..3df2cc4 100644
--- a/Source/WebCore/page/DOMWindow.cpp
+++ b/Source/WebCore/page/DOMWindow.cpp
@@ -21,7 +21,7 @@
* 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.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -69,7 +69,7 @@
#include "HTMLFrameOwnerElement.h"
#include "History.h"
#include "InspectorInstrumentation.h"
-#include "URL.h"
+#include "JSMainThreadExecState.h"
#include "Location.h"
#include "MainFrame.h"
#include "MediaQueryList.h"
@@ -85,8 +85,6 @@
#include "RuntimeEnabledFeatures.h"
#include "ScheduledAction.h"
#include "Screen.h"
-#include "ScriptCallStack.h"
-#include "ScriptCallStackFactory.h"
#include "ScriptController.h"
#include "SecurityOrigin.h"
#include "SecurityPolicy.h"
@@ -98,10 +96,13 @@
#include "StyleMedia.h"
#include "StyleResolver.h"
#include "SuddenTermination.h"
+#include "URL.h"
#include "WebKitPoint.h"
#include "WindowFeatures.h"
#include "WindowFocusAllowedIndicator.h"
#include <algorithm>
+#include <inspector/ScriptCallStack.h>
+#include <inspector/ScriptCallStackFactory.h>
#include <wtf/CurrentTime.h>
#include <wtf/MainThread.h>
#include <wtf/MathExtras.h>
@@ -124,6 +125,8 @@
#include "WKContentObservation.h"
#endif
+using namespace Inspector;
+
namespace WebCore {
class PostMessageTimer : public TimerBase {
@@ -843,7 +846,7 @@
// Capture stack trace only when inspector front-end is loaded as it may be time consuming.
RefPtr<ScriptCallStack> stackTrace;
if (InspectorInstrumentation::consoleAgentEnabled(sourceDocument))
- stackTrace = createScriptCallStack(ScriptCallStack::maxCallStackSizeToCapture, true);
+ stackTrace = createScriptCallStack(JSMainThreadExecState::currentState(), ScriptCallStack::maxCallStackSizeToCapture, true);
// Schedule the message.
PostMessageTimer* timer = new PostMessageTimer(this, message, sourceOrigin, &source, channels.release(), target.get(), stackTrace.release());
@@ -867,7 +870,7 @@
if (!intendedTargetOrigin->isSameSchemeHostPort(document()->securityOrigin())) {
String message = "Unable to post message to " + intendedTargetOrigin->toString() +
". Recipient has origin " + document()->securityOrigin()->toString() + ".\n";
- pageConsole()->addMessage(SecurityMessageSource, ErrorMessageLevel, message, stackTrace);
+ pageConsole()->addMessage(MessageSource::Security, MessageLevel::Error, message, stackTrace);
return;
}
}
@@ -966,7 +969,7 @@
bool allowScriptsToCloseWindows = m_frame->settings().allowScriptsToCloseWindows();
if (!(page->openedByDOM() || page->backForward().count() <= 1 || allowScriptsToCloseWindows)) {
- pageConsole()->addMessage(JSMessageSource, WarningMessageLevel, ASCIILiteral("Can't close the window since it was not opened by JavaScript"));
+ pageConsole()->addMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Can't close the window since it was not opened by JavaScript"));
return;
}
@@ -1936,7 +1939,7 @@
if (message.isEmpty())
return;
- pageConsole()->addMessage(JSMessageSource, ErrorMessageLevel, message);
+ pageConsole()->addMessage(MessageSource::JS, MessageLevel::Error, message);
}
String DOMWindow::crossDomainAccessErrorMessage(const DOMWindow& activeWindow)
diff --git a/Source/WebCore/page/DOMWindow.h b/Source/WebCore/page/DOMWindow.h
index 929781a..efa10e6 100644
--- a/Source/WebCore/page/DOMWindow.h
+++ b/Source/WebCore/page/DOMWindow.h
@@ -34,6 +34,10 @@
#include "Supplementable.h"
#include <functional>
+namespace Inspector {
+class ScriptCallStack;
+}
+
namespace WebCore {
class BarProp;
@@ -65,7 +69,6 @@
class PostMessageTimer;
class ScheduledAction;
class Screen;
- class ScriptCallStack;
class SecurityOrigin;
class SerializedScriptValue;
class Storage;
@@ -239,7 +242,7 @@
// Needed for Objective-C bindings (see bug 28774).
void postMessage(PassRefPtr<SerializedScriptValue> message, MessagePort*, const String& targetOrigin, DOMWindow& source, ExceptionCode&);
void postMessageTimerFired(PassOwnPtr<PostMessageTimer>);
- void dispatchMessageEventWithOriginCheck(SecurityOrigin* intendedTargetOrigin, PassRefPtr<Event>, PassRefPtr<ScriptCallStack>);
+ void dispatchMessageEventWithOriginCheck(SecurityOrigin* intendedTargetOrigin, PassRefPtr<Event>, PassRefPtr<Inspector::ScriptCallStack>);
void scrollBy(int x, int y) const;
void scrollTo(int x, int y) const;
diff --git a/Source/WebCore/page/EventSource.cpp b/Source/WebCore/page/EventSource.cpp
index 4ccfbe3..e1d951a 100644
--- a/Source/WebCore/page/EventSource.cpp
+++ b/Source/WebCore/page/EventSource.cpp
@@ -46,7 +46,6 @@
#include "ResourceError.h"
#include "ResourceRequest.h"
#include "ResourceResponse.h"
-#include "ScriptCallStack.h"
#include "ScriptController.h"
#include "ScriptExecutionContext.h"
#include "SecurityOrigin.h"
@@ -228,7 +227,7 @@
message.append(charset);
message.appendLiteral("\") that is not UTF-8. Aborting the connection.");
// FIXME: We are missing the source line.
- scriptExecutionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message.toString());
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, message.toString());
}
} else {
// To keep the signal-to-noise ratio low, we only log 200-response with an invalid MIME type.
@@ -238,7 +237,7 @@
message.append(response.mimeType());
message.appendLiteral("\") that is not \"text/event-stream\". Aborting the connection.");
// FIXME: We are missing the source line.
- scriptExecutionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message.toString());
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, message.toString());
}
}
@@ -290,7 +289,7 @@
void EventSource::didFailAccessControlCheck(const ResourceError& error)
{
String message = makeString("EventSource cannot load ", error.failingURL(), ". ", error.localizedDescription());
- scriptExecutionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message);
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, message);
abortConnectionAttempt();
}
diff --git a/Source/WebCore/page/PageConsole.cpp b/Source/WebCore/page/PageConsole.cpp
index 2914cbb..440f78b 100644
--- a/Source/WebCore/page/PageConsole.cpp
+++ b/Source/WebCore/page/PageConsole.cpp
@@ -31,24 +31,25 @@
#include "Chrome.h"
#include "ChromeClient.h"
-#include "ConsoleAPITypes.h"
-#include "ConsoleTypes.h"
#include "Document.h"
#include "Frame.h"
#include "InspectorConsoleInstrumentation.h"
#include "InspectorController.h"
#include "JSMainThreadExecState.h"
#include "Page.h"
-#include "ScriptArguments.h"
-#include "ScriptCallStack.h"
-#include "ScriptCallStackFactory.h"
#include "ScriptableDocumentParser.h"
#include "Settings.h"
#include <bindings/ScriptValue.h>
+#include <inspector/ConsoleTypes.h>
+#include <inspector/ScriptArguments.h>
+#include <inspector/ScriptCallStack.h>
+#include <inspector/ScriptCallStackFactory.h>
#include <stdio.h>
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
+using namespace Inspector;
+
namespace WebCore {
namespace {
@@ -80,34 +81,34 @@
{
const char* sourceString;
switch (source) {
- case XMLMessageSource:
+ case MessageSource::XML:
sourceString = "XML";
break;
- case JSMessageSource:
+ case MessageSource::JS:
sourceString = "JS";
break;
- case NetworkMessageSource:
+ case MessageSource::Network:
sourceString = "NETWORK";
break;
- case ConsoleAPIMessageSource:
+ case MessageSource::ConsoleAPI:
sourceString = "CONSOLE";
break;
- case StorageMessageSource:
+ case MessageSource::Storage:
sourceString = "STORAGE";
break;
- case AppCacheMessageSource:
+ case MessageSource::AppCache:
sourceString = "APPCACHE";
break;
- case RenderingMessageSource:
+ case MessageSource::Rendering:
sourceString = "RENDERING";
break;
- case CSSMessageSource:
+ case MessageSource::CSS:
sourceString = "CSS";
break;
- case SecurityMessageSource:
+ case MessageSource::Security:
sourceString = "SECURITY";
break;
- case OtherMessageSource:
+ case MessageSource::Other:
sourceString = "OTHER";
break;
default:
@@ -118,16 +119,16 @@
const char* levelString;
switch (level) {
- case DebugMessageLevel:
+ case MessageLevel::Debug:
levelString = "DEBUG";
break;
- case LogMessageLevel:
+ case MessageLevel::Log:
levelString = "LOG";
break;
- case WarningMessageLevel:
+ case MessageLevel::Warning:
levelString = "WARN";
break;
- case ErrorMessageLevel:
+ case MessageLevel::Error:
levelString = "ERROR";
break;
default:
@@ -147,6 +148,7 @@
String url;
if (document)
url = document->url().string();
+
// 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).
@@ -162,7 +164,7 @@
column = position.m_column.oneBasedInt();
}
}
- addMessage(source, level, message, url, line, column, 0, 0, requestIdentifier);
+ addMessage(source, level, message, url, line, column, 0, JSMainThreadExecState::currentState(), requestIdentifier);
}
void PageConsole::addMessage(MessageSource source, MessageLevel level, const String& message, PassRefPtr<ScriptCallStack> callStack)
@@ -172,15 +174,15 @@
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 != ConsoleAPIMessageSource)
+ if (muteCount && source != MessageSource::ConsoleAPI)
return;
if (callStack)
- InspectorInstrumentation::addMessageToConsole(&m_page, source, LogMessageType, level, message, callStack, requestIdentifier);
+ InspectorInstrumentation::addMessageToConsole(&m_page, source, MessageType::Log, level, message, callStack, requestIdentifier);
else
- InspectorInstrumentation::addMessageToConsole(&m_page, source, LogMessageType, level, message, url, lineNumber, columnNumber, state, requestIdentifier);
+ InspectorInstrumentation::addMessageToConsole(&m_page, source, MessageType::Log, level, message, url, lineNumber, columnNumber, state, requestIdentifier);
- if (source == CSSMessageSource)
+ if (source == MessageSource::CSS)
return;
if (m_page.settings().privateBrowsingEnabled())
diff --git a/Source/WebCore/page/PageConsole.h b/Source/WebCore/page/PageConsole.h
index 9a70e54..5ab7122 100644
--- a/Source/WebCore/page/PageConsole.h
+++ b/Source/WebCore/page/PageConsole.h
@@ -29,8 +29,8 @@
#ifndef PageConsole_h
#define PageConsole_h
-#include "ConsoleTypes.h"
-#include "ScriptCallStack.h"
+#include <inspector/ConsoleTypes.h>
+#include <inspector/ScriptCallStack.h>
#include <wtf/Forward.h>
#include <wtf/PassOwnPtr.h>
@@ -51,8 +51,8 @@
static void printSourceURLAndPosition(const String& sourceURL, unsigned lineNumber, unsigned columnNumber = 0);
static void printMessageSourceAndLevelPrefix(MessageSource, MessageLevel, bool showAsTrace = false);
- void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> = 0, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
- void addMessage(MessageSource, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>);
+ void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<Inspector::ScriptCallStack> = 0, JSC::ExecState* = 0, 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* = 0);
static void mute();
diff --git a/Source/WebCore/page/PointerLockController.cpp b/Source/WebCore/page/PointerLockController.cpp
index 5d6f5a5..2596ffc 100644
--- a/Source/WebCore/page/PointerLockController.cpp
+++ b/Source/WebCore/page/PointerLockController.cpp
@@ -56,7 +56,7 @@
if (target->document().isSandboxed(SandboxPointerLock)) {
// FIXME: This message should be moved off the console once a solution to https://bugs.webkit.org/show_bug.cgi?id=103274 exists.
- target->document().addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Blocked pointer lock on an element because the element's frame is sandboxed and the 'allow-pointer-lock' permission is not set.");
+ target->document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, ASCIILiteral("Blocked pointer lock on an element because the element's frame is sandboxed and the 'allow-pointer-lock' permission is not set."));
enqueueEvent(eventNames().webkitpointerlockerrorEvent, target);
return;
}
diff --git a/Source/WebCore/platform/CrossThreadCopier.h b/Source/WebCore/platform/CrossThreadCopier.h
index 3f81ca0..caf279f 100644
--- a/Source/WebCore/platform/CrossThreadCopier.h
+++ b/Source/WebCore/platform/CrossThreadCopier.h
@@ -66,8 +66,8 @@
typedef T Type;
};
- template<typename T> struct IsConvertibleToInteger {
- static const bool value = std::is_integral<T>::value || std::is_convertible<T, long double>::value;
+ template<typename T> struct IsEnumOrConvertibleToInteger {
+ static const bool value = std::is_integral<T>::value || std::is_enum<T>::value || std::is_convertible<T, long double>::value;
};
template<typename T> struct IsThreadSafeRefCountedPointer {
@@ -83,7 +83,7 @@
}
};
- template<bool isConvertibleToInteger, bool isThreadSafeRefCounted, typename T> struct CrossThreadCopierBase;
+ template<bool isEnumOrConvertibleToInteger, bool isThreadSafeRefCounted, typename T> struct CrossThreadCopierBase;
// Integers get passed through without any changes.
template<typename T> struct CrossThreadCopierBase<true, false, T> : public CrossThreadCopierPassThrough<T> {
@@ -199,7 +199,7 @@
#endif
template<typename T>
- struct CrossThreadCopier : public CrossThreadCopierBase<CrossThreadCopierBaseHelper::IsConvertibleToInteger<T>::value, CrossThreadCopierBaseHelper::IsThreadSafeRefCountedPointer<T>::value, T> {
+ struct CrossThreadCopier : public CrossThreadCopierBase<CrossThreadCopierBaseHelper::IsEnumOrConvertibleToInteger<T>::value, CrossThreadCopierBaseHelper::IsThreadSafeRefCountedPointer<T>::value, T> {
};
template<typename T> struct AllowCrossThreadAccessWrapper {
diff --git a/Source/WebCore/rendering/shapes/ShapeInfo.cpp b/Source/WebCore/rendering/shapes/ShapeInfo.cpp
index 78dff99..dfde252 100644
--- a/Source/WebCore/rendering/shapes/ShapeInfo.cpp
+++ b/Source/WebCore/rendering/shapes/ShapeInfo.cpp
@@ -50,7 +50,7 @@
const URL& url = cachedImage.url();
String urlString = url.isNull() ? "''" : url.stringCenterEllipsizedToLength();
- document.addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Unsafe attempt to load URL " + urlString + ".");
+ document.addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Unsafe attempt to load URL " + urlString + ".");
return false;
}
diff --git a/Source/WebCore/svg/SVGDocumentExtensions.cpp b/Source/WebCore/svg/SVGDocumentExtensions.cpp
index d8fbd998..c1bb83d 100644
--- a/Source/WebCore/svg/SVGDocumentExtensions.cpp
+++ b/Source/WebCore/svg/SVGDocumentExtensions.cpp
@@ -131,17 +131,17 @@
static void reportMessage(Document* document, MessageLevel level, const String& message)
{
if (document->frame())
- document->addConsoleMessage(RenderingMessageSource, level, message);
+ document->addConsoleMessage(MessageSource::Rendering, level, message);
}
void SVGDocumentExtensions::reportWarning(const String& message)
{
- reportMessage(m_document, WarningMessageLevel, "Warning: " + message);
+ reportMessage(m_document, MessageLevel::Warning, "Warning: " + message);
}
void SVGDocumentExtensions::reportError(const String& message)
{
- reportMessage(m_document, ErrorMessageLevel, "Error: " + message);
+ reportMessage(m_document, MessageLevel::Error, "Error: " + message);
}
void SVGDocumentExtensions::addPendingResource(const AtomicString& id, Element* element)
diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp
index b1cb517..ac6c140 100644
--- a/Source/WebCore/testing/Internals.cpp
+++ b/Source/WebCore/testing/Internals.cpp
@@ -57,7 +57,6 @@
#include "HistoryController.h"
#include "HistoryItem.h"
#include "InspectorClient.h"
-#include "InspectorConsoleAgent.h"
#include "InspectorController.h"
#include "InspectorCounters.h"
#include "InspectorForwarding.h"
@@ -65,8 +64,8 @@
#include "InspectorInstrumentation.h"
#include "InspectorOverlay.h"
#include "InstrumentingAgents.h"
-#include "InternalSettings.h"
#include "IntRect.h"
+#include "InternalSettings.h"
#include "Language.h"
#include "MainFrame.h"
#include "MallocStatistics.h"
@@ -95,6 +94,7 @@
#include "TreeScope.h"
#include "TypeConversions.h"
#include "ViewportArguments.h"
+#include "WebConsoleAgent.h"
#include "WorkerThread.h"
#include <bytecode/CodeBlock.h>
#include <inspector/InspectorAgentBase.h>
@@ -1427,9 +1427,11 @@
InstrumentingAgents* instrumentingAgents = instrumentationForPage(document->page());
if (!instrumentingAgents)
return Vector<String>();
- InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent();
+
+ InspectorConsoleAgent* consoleAgent = instrumentingAgents->webConsoleAgent();
if (!consoleAgent)
return Vector<String>();
+
Vector<unsigned> counts = consoleAgent->consoleMessageArgumentCounts();
Vector<String> result(counts.size());
for (size_t i = 0; i < counts.size(); i++)
diff --git a/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp b/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp
index a64a4c9..d3a369f 100644
--- a/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp
+++ b/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp
@@ -44,7 +44,6 @@
#include "NotImplemented.h"
#include "PageGroup.h"
#include "PlatformStrategies.h"
-#include "ScriptCallStack.h"
#include "SecurityOrigin.h"
#include "SecurityOriginHash.h"
#include "SharedWorker.h"
@@ -56,6 +55,7 @@
#include "WorkerReportingProxy.h"
#include "WorkerScriptLoader.h"
#include "WorkerScriptLoaderClient.h"
+#include <inspector/ScriptCallStack.h>
#include <mutex>
#include <wtf/HashSet.h>
#include <wtf/Threading.h>
diff --git a/Source/WebCore/workers/SharedWorkerGlobalScope.cpp b/Source/WebCore/workers/SharedWorkerGlobalScope.cpp
index 138bfac..23f2fa8 100644
--- a/Source/WebCore/workers/SharedWorkerGlobalScope.cpp
+++ b/Source/WebCore/workers/SharedWorkerGlobalScope.cpp
@@ -38,9 +38,9 @@
#include "EventNames.h"
#include "MessageEvent.h"
#include "NotImplemented.h"
-#include "ScriptCallStack.h"
#include "SecurityOrigin.h"
#include "SharedWorkerThread.h"
+#include <inspector/ScriptCallStack.h>
namespace WebCore {
@@ -80,10 +80,10 @@
return static_cast<SharedWorkerThread*>(Base::thread());
}
-void SharedWorkerGlobalScope::logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack> callStack)
+void SharedWorkerGlobalScope::logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<Inspector::ScriptCallStack> callStack)
{
WorkerGlobalScope::logExceptionToConsole(errorMessage, sourceURL, lineNumber, columnNumber, callStack);
- addMessageToWorkerConsole(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, columnNumber, callStack);
+ addMessageToWorkerConsole(MessageSource::JS, MessageLevel::Error, errorMessage, sourceURL, lineNumber, columnNumber, callStack);
}
} // namespace WebCore
diff --git a/Source/WebCore/workers/SharedWorkerGlobalScope.h b/Source/WebCore/workers/SharedWorkerGlobalScope.h
index ce68702..c14717b 100644
--- a/Source/WebCore/workers/SharedWorkerGlobalScope.h
+++ b/Source/WebCore/workers/SharedWorkerGlobalScope.h
@@ -60,7 +60,7 @@
private:
SharedWorkerGlobalScope(const String& name, const URL&, const String& userAgent, std::unique_ptr<GroupSettings>, SharedWorkerThread*);
- virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) override;
+ virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<Inspector::ScriptCallStack>) override;
String m_name;
};
diff --git a/Source/WebCore/workers/WorkerGlobalScope.cpp b/Source/WebCore/workers/WorkerGlobalScope.cpp
index 2889236..ab1998d 100644
--- a/Source/WebCore/workers/WorkerGlobalScope.cpp
+++ b/Source/WebCore/workers/WorkerGlobalScope.cpp
@@ -21,12 +21,11 @@
* 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.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "config.h"
-
#include "WorkerGlobalScope.h"
#include "ActiveDOMObject.h"
@@ -39,13 +38,12 @@
#include "EventException.h"
#include "ExceptionCode.h"
#include "InspectorConsoleInstrumentation.h"
-#include "URL.h"
#include "MessagePort.h"
#include "NotImplemented.h"
#include "ScheduledAction.h"
-#include "ScriptCallStack.h"
#include "ScriptSourceCode.h"
#include "SecurityOrigin.h"
+#include "URL.h"
#include "WorkerInspectorController.h"
#include "WorkerLocation.h"
#include "WorkerNavigator.h"
@@ -55,12 +53,15 @@
#include "WorkerThreadableLoader.h"
#include "XMLHttpRequestException.h"
#include <bindings/ScriptValue.h>
+#include <inspector/ScriptCallStack.h>
#include <wtf/RefPtr.h>
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#include "NotificationCenter.h"
#endif
+using namespace Inspector;
+
namespace WebCore {
class CloseWorkerGlobalScopeTask : public ScriptExecutionContext::Task {
@@ -275,9 +276,9 @@
{
ASSERT(isContextThread());
if (callStack)
- InspectorInstrumentation::addMessageToConsole(this, source, LogMessageType, level, message, callStack, requestIdentifier);
+ InspectorInstrumentation::addMessageToConsole(this, source, MessageType::Log, level, message, callStack, requestIdentifier);
else
- InspectorInstrumentation::addMessageToConsole(this, source, LogMessageType, level, message, sourceURL, lineNumber, columnNumber, state, requestIdentifier);
+ InspectorInstrumentation::addMessageToConsole(this, source, MessageType::Log, level, message, sourceURL, lineNumber, columnNumber, state, requestIdentifier);
}
bool WorkerGlobalScope::isContextThread() const
diff --git a/Source/WebCore/workers/WorkerGlobalScope.h b/Source/WebCore/workers/WorkerGlobalScope.h
index 5819965..e4e1b87 100644
--- a/Source/WebCore/workers/WorkerGlobalScope.h
+++ b/Source/WebCore/workers/WorkerGlobalScope.h
@@ -139,8 +139,8 @@
WorkerGlobalScope(const URL&, const String& userAgent, std::unique_ptr<GroupSettings>, WorkerThread*, PassRefPtr<SecurityOrigin> topOrigin);
void applyContentSecurityPolicyFromString(const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
- virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) override;
- void addMessageToWorkerConsole(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
+ virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<Inspector::ScriptCallStack>) override;
+ void addMessageToWorkerConsole(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<Inspector::ScriptCallStack>, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
private:
virtual void refScriptExecutionContext() override { ref(); }
@@ -149,7 +149,7 @@
virtual void refEventTarget() override final { ref(); }
virtual void derefEventTarget() override final { deref(); }
- virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, JSC::ExecState* = 0, unsigned long requestIdentifier = 0) override;
+ virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<Inspector::ScriptCallStack>, JSC::ExecState* = 0, unsigned long requestIdentifier = 0) override;
virtual EventTarget* errorEventTarget() override;
diff --git a/Source/WebCore/workers/WorkerMessagingProxy.cpp b/Source/WebCore/workers/WorkerMessagingProxy.cpp
index 324cd89..575ff2c 100644
--- a/Source/WebCore/workers/WorkerMessagingProxy.cpp
+++ b/Source/WebCore/workers/WorkerMessagingProxy.cpp
@@ -26,14 +26,13 @@
*/
#include "config.h"
-
#include "WorkerMessagingProxy.h"
#include "ContentSecurityPolicy.h"
#include "CrossThreadTask.h"
+#include "DOMWindow.h"
#include "DedicatedWorkerGlobalScope.h"
#include "DedicatedWorkerThread.h"
-#include "DOMWindow.h"
#include "Document.h"
#include "ErrorEvent.h"
#include "Event.h"
@@ -43,12 +42,13 @@
#include "MessageEvent.h"
#include "NotImplemented.h"
#include "PageGroup.h"
-#include "ScriptCallStack.h"
#include "ScriptExecutionContext.h"
#include "Worker.h"
#include "WorkerDebuggerAgent.h"
#include "WorkerInspectorController.h"
+#include <inspector/ConsoleTypes.h>
#include <inspector/InspectorAgentBase.h>
+#include <inspector/ScriptCallStack.h>
#include <wtf/MainThread.h>
namespace WebCore {
diff --git a/Source/WebCore/workers/WorkerReportingProxy.h b/Source/WebCore/workers/WorkerReportingProxy.h
index 61a6611..003d0e2 100644
--- a/Source/WebCore/workers/WorkerReportingProxy.h
+++ b/Source/WebCore/workers/WorkerReportingProxy.h
@@ -31,7 +31,7 @@
#ifndef WorkerReportingProxy_h
#define WorkerReportingProxy_h
-#include "ConsoleTypes.h"
+#include <inspector/ConsoleTypes.h>
#include <wtf/Forward.h>
namespace WebCore {
diff --git a/Source/WebCore/xml/XMLHttpRequest.cpp b/Source/WebCore/xml/XMLHttpRequest.cpp
index 11ed61d..044848c 100644
--- a/Source/WebCore/xml/XMLHttpRequest.cpp
+++ b/Source/WebCore/xml/XMLHttpRequest.cpp
@@ -43,7 +43,6 @@
#include "ParsedContentType.h"
#include "ResourceError.h"
#include "ResourceRequest.h"
-#include "ScriptCallStack.h"
#include "ScriptController.h"
#include "ScriptProfile.h"
#include "Settings.h"
@@ -160,7 +159,7 @@
return;
// FIXME: It's not good to report the bad usage without indicating what source line it came from.
// We should pass additional parameters so we can tell the console where the mistake occurred.
- context->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message);
+ context->addConsoleMessage(MessageSource::JS, MessageLevel::Error, message);
}
PassRefPtr<XMLHttpRequest> XMLHttpRequest::create(ScriptExecutionContext& context)
@@ -709,7 +708,7 @@
void XMLHttpRequest::send(ArrayBuffer* body, ExceptionCode& ec)
{
String consoleMessage("ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.");
- scriptExecutionContext()->addConsoleMessage(JSMessageSource, WarningMessageLevel, consoleMessage);
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, consoleMessage);
HistogramSupport::histogramEnumeration("WebCore.XHR.send.ArrayBufferOrView", XMLHttpRequestSendArrayBuffer, XMLHttpRequestSendArrayBufferOrViewMax);
diff --git a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
index 8093118..1c0d7c7 100644
--- a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
+++ b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
@@ -86,20 +86,20 @@
MessageLevel level;
switch (error->level) {
case XML_ERR_NONE:
- level = DebugMessageLevel;
+ level = MessageLevel::Debug;
break;
case XML_ERR_WARNING:
- level = WarningMessageLevel;
+ level = MessageLevel::Warning;
break;
case XML_ERR_ERROR:
case XML_ERR_FATAL:
default:
- level = ErrorMessageLevel;
+ level = MessageLevel::Error;
break;
}
// xmlError->int2 is the column number of the error or 0 if N/A.
- console->addMessage(XMLMessageSource, level, error->message, error->file, error->line, error->int2);
+ console->addMessage(MessageSource::XML, level, error->message, error->file, error->line, error->int2);
}
// FIXME: There seems to be no way to control the ctxt pointer for loading here, thus we have globals.