#include "config.h"
#include "JSGlobalObjectDebuggerAgent.h"
-#if ENABLE(INSPECTOR)
-
+#include "ConsoleMessage.h"
#include "InjectedScriptManager.h"
#include "InspectorConsoleAgent.h"
#include "JSGlobalObject.h"
scriptDebugServer().removeListener(this, isBeingDestroyed);
}
-InjectedScript JSGlobalObjectDebuggerAgent::injectedScriptForEval(ErrorString* error, const int* executionContextId)
+InjectedScript JSGlobalObjectDebuggerAgent::injectedScriptForEval(ErrorString& error, const int* executionContextId)
{
if (executionContextId) {
- *error = ASCIILiteral("Execution context id is not supported for JSContext inspection as there is only one execution context.");
+ error = ASCIILiteral("Execution context id is not supported for JSContext inspection as there is only one execution context.");
return InjectedScript();
}
void JSGlobalObjectDebuggerAgent::breakpointActionLog(JSC::ExecState* exec, const String& message)
{
- m_consoleAgent->addMessageToConsole(MessageSource::JS, MessageType::Log, MessageLevel::Log, message, createScriptCallStack(exec, ScriptCallStack::maxCallStackSizeToCapture), 0);
+ m_consoleAgent->addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::JS, MessageType::Log, MessageLevel::Log, message, createScriptCallStack(exec, ScriptCallStack::maxCallStackSizeToCapture), 0));
}
} // namespace Inspector
-
-#endif // ENABLE(INSPECTOR)