Title: [186418] releases/WebKitGTK/webkit-2.8/Source/WebCore
Revision
186418
Author
[email protected]
Date
2015-07-07 01:45:57 -0700 (Tue, 07 Jul 2015)

Log Message

Merge r185712 - Crash under WebCore::DOMWindow::dispatchMessageEventWithOriginCheck attempting to log console message
https://bugs.webkit.org/show_bug.cgi?id=146093

Patch by Joseph Pecoraro <[email protected]> on 2015-06-18
Reviewed by Timothy Hatcher.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
The console could be null so null check its use.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog (186417 => 186418)


--- releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog	2015-07-07 08:42:48 UTC (rev 186417)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog	2015-07-07 08:45:57 UTC (rev 186418)
@@ -1,3 +1,14 @@
+2015-06-18  Joseph Pecoraro  <[email protected]>
+
+        Crash under WebCore::DOMWindow::dispatchMessageEventWithOriginCheck attempting to log console message
+        https://bugs.webkit.org/show_bug.cgi?id=146093
+
+        Reviewed by Timothy Hatcher.
+
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
+        The console could be null so null check its use.
+
 2015-06-17  Simon Fraser  <[email protected]>
 
         REGRESSION (r173283-r173296): Amazon.com front page has no caret in the search field

Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/page/DOMWindow.cpp (186417 => 186418)


--- releases/WebKitGTK/webkit-2.8/Source/WebCore/page/DOMWindow.cpp	2015-07-07 08:42:48 UTC (rev 186417)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/page/DOMWindow.cpp	2015-07-07 08:45:57 UTC (rev 186418)
@@ -932,9 +932,10 @@
     if (intendedTargetOrigin) {
         // Check target origin now since the target document may have changed since the timer was scheduled.
         if (!intendedTargetOrigin->isSameSchemeHostPort(document()->securityOrigin())) {
-            String message = "Unable to post message to " + intendedTargetOrigin->toString() +
-                             ". Recipient has origin " + document()->securityOrigin()->toString() + ".\n";
-            console()->addMessage(MessageSource::Security, MessageLevel::Error, message, stackTrace);
+            if (PageConsoleClient* pageConsole = console()) {
+                String message = makeString("Unable to post message to ", intendedTargetOrigin->toString(), ". Recipient has origin ", document()->securityOrigin()->toString(), ".\n");
+                pageConsole->addMessage(MessageSource::Security, MessageLevel::Error, message, stackTrace);
+            }
             return;
         }
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to