[haiku-webkit-commits] r294 - webkit/trunk/WebKit/haiku/WebCoreSupport

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Sat, 06 Mar 2010 00:25:03 +0000

Author: stippi
Date: Sat Mar  6 00:25:02 2010
New Revision: 294
URL: http://mmlr.dyndns.org/changeset/294

Log:
Check for "null" requests. Prevents a crash when trying to load the resource
later. As experienced when clicking to close the funny "You are using an old
browser, use the new Internet Exporer!" banner that slides from the top on
GMX.net.

Modified:
   webkit/trunk/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp

Modified: webkit/trunk/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
==============================================================================
--- webkit/trunk/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp      Fri Mar 
 5 21:40:55 2010        (r293)
+++ webkit/trunk/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp      Sat Mar 
 6 00:25:02 2010        (r294)
@@ -124,6 +124,9 @@
 
 Page* ChromeClientHaiku::createWindow(Frame*, const FrameLoadRequest& request, 
const WebCore::WindowFeatures& features)
 {
+       if (request.resourceRequest().isNull())
+           return 0;
+
     BRect frame;
     if (features.xSet && features.ySet && features.widthSet && 
features.heightSet) {
         frame.left = features.x;
@@ -133,7 +136,7 @@
     }
 
        WebCore::Page* page = m_webPage->createNewPage(frame, features.dialog, 
features.resizable);
-    if (page)
+    if (page && page->mainFrame() && page->mainFrame()->loader())
         page->mainFrame()->loader()->load(request.resourceRequest(), false);
 
     return page;

Other related posts:

  • » [haiku-webkit-commits] r294 - webkit/trunk/WebKit/haiku/WebCoreSupport - webkit