Skip to content

Commit

Permalink
Merge pull request #400 from LibertyGlobal/vogorodnik/ARRISAPOL-3441_…
Browse files Browse the repository at this point in the history
…fix_console_messages

ARRISAPOL-3441 fix console messages
  • Loading branch information
volodymyr-ogorodnik-red authored Jul 8, 2024
2 parents e2101a5 + cc6731a commit 849a7cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/WebCore/page/PageConsoleClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void PageConsoleClient::unmute()

void PageConsoleClient::addMessage(std::unique_ptr<Inspector::ConsoleMessage>&& consoleMessage)
{
if (!m_page.usesEphemeralSession()) {
if (!m_page.usesEphemeralSession() || m_page.isControlledByAutomation()) {
String message;
Span<const String> additionalArguments;
Vector<String> messageArgumentsVector;
Expand Down Expand Up @@ -198,8 +198,9 @@ void PageConsoleClient::messageWithTypeAndLevel(MessageType type, MessageLevel l

InspectorInstrumentation::addMessageToConsole(m_page, WTFMove(message));

if (m_page.usesEphemeralSession())
if (m_page.usesEphemeralSession() && !m_page.isControlledByAutomation()) {
return;
}

if (!messageArgumentsVector.isEmpty()) {
m_page.chrome().client().addMessageToConsole(MessageSource::ConsoleAPI, level, messageText, lineNumber, columnNumber, url);
Expand Down

0 comments on commit 849a7cb

Please sign in to comment.