Index: Source/core/frame/LocalDOMWindow.cpp |
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp |
index daccebb8c8765c4cecef60d429956e97c33b4df0..0ab41a0219fd2ac679bcaf7e8bbfc3abed6d2bd3 100644 |
--- a/Source/core/frame/LocalDOMWindow.cpp |
+++ b/Source/core/frame/LocalDOMWindow.cpp |
@@ -72,6 +72,7 @@ |
#include "core/frame/Screen.h" |
#include "core/frame/Settings.h" |
#include "core/html/HTMLFrameOwnerElement.h" |
+#include "core/inspector/ConsoleMessage.h" |
#include "core/inspector/InspectorInstrumentation.h" |
#include "core/inspector/InspectorTraceEvents.h" |
#include "core/inspector/ScriptCallStack.h" |
@@ -889,7 +890,7 @@ void LocalDOMWindow::dispatchMessageEventWithOriginCheck(SecurityOrigin* intende |
// Check target origin now since the target document may have changed since the timer was scheduled. |
if (!intendedTargetOrigin->isSameSchemeHostPort(document()->securityOrigin())) { |
String message = ExceptionMessages::failedToExecute("postMessage", "DOMWindow", "The target origin provided ('" + intendedTargetOrigin->toString() + "') does not match the recipient window's origin ('" + document()->securityOrigin()->toString() + "')."); |
- frameConsole()->addMessage(SecurityMessageSource, ErrorMessageLevel, message, stackTrace); |
+ frameConsole()->addMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel, message, stackTrace)); |
return; |
} |
} |
@@ -969,7 +970,7 @@ void LocalDOMWindow::close(ExecutionContext* context) |
bool allowScriptsToCloseWindows = settings && settings->allowScriptsToCloseWindows(); |
if (!(page->openedByDOM() || page->backForward().backForwardListCount() <= 1 || allowScriptsToCloseWindows)) { |
- frameConsole()->addMessage(JSMessageSource, WarningMessageLevel, "Scripts may close only the windows that were opened by it."); |
+ frameConsole()->addMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, "Scripts may close only the windows that were opened by it.")); |
return; |
} |
@@ -1702,7 +1703,7 @@ void LocalDOMWindow::printErrorMessage(const String& message) |
if (message.isEmpty()) |
return; |
- frameConsole()->addMessage(JSMessageSource, ErrorMessageLevel, message); |
+ frameConsole()->addMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message)); |
} |
// FIXME: Once we're throwing exceptions for cross-origin access violations, we will always sanitize the target |