Changeset 55270 in webkit


Ignore:
Timestamp:
Feb 25, 2010 11:40:05 PM (14 years ago)
Author:
mrowe@apple.com
Message:

<rdar://problem/7688455> REGRESSION(r55205): Crash inside dispatchEventsOnWindowAndFocusedNode when clicking link from bookmarks view

Reviewed by Brady Eidson.

Null-check the document's page to avoid dereferencing a null page.

No regression test is added as this appears to be dependent on an interaction with Safari's bookmarks view that is
not testable from within DumpRenderTree.

  • page/FocusController.cpp:

(WebCore::dispatchEventsOnWindowAndFocusedNode):

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r55266 r55270  
     12010-02-25  Mark Rowe  <mrowe@apple.com>
     2
     3        Reviewed by Brady Eidson.
     4
     5        <rdar://problem/7688455> REGRESSION(r55205): Crash inside dispatchEventsOnWindowAndFocusedNode when clicking link from bookmarks view
     6
     7        Null-check the document's page to avoid dereferencing a null page.
     8
     9        No regression test is added as this appears to be dependent on an interaction with Safari's bookmarks view that is
     10        not testable from within DumpRenderTree.
     11
     12        * page/FocusController.cpp:
     13        (WebCore::dispatchEventsOnWindowAndFocusedNode):
     14
    1152010-02-25  Oliver Hunt  <oliver@apple.com>
    216
  • trunk/WebCore/page/FocusController.cpp

    r55205 r55270  
    6262    // If we have a focused node we should dispatch focus on it after we focus the window.
    6363    // https://bugs.webkit.org/show_bug.cgi?id=27105
    64  
     64
    6565    // Do not fire events while modal dialogs are up.  See https://bugs.webkit.org/show_bug.cgi?id=33962
    66     if (document->page()->defersLoading())
    67         return;
     66    if (Page* page = document->page()) {
     67        if (page->defersLoading())
     68            return;
     69    }
     70
    6871    if (!focused && document->focusedNode())
    6972        document->focusedNode()->dispatchBlurEvent();
Note: See TracChangeset for help on using the changeset viewer.