Changeset 135740 in webkit


Ignore:
Timestamp:
Nov 26, 2012, 10:58:27 AM (13 years ago)
Author:
inferno@chromium.org
Message:

Crash in Frame::dispatchVisibilityStateChangeEvent.
https://bugs.webkit.org/show_bug.cgi?id=102053

Reviewed by Adam Barth.

Source/WebCore:

Child frame can go away inside webkitvisibilitychange
event handler. Store it in a ref counted vector.

Test: fast/frames/page-visibility-crash.html

  • page/Frame.cpp:

(WebCore::Frame::dispatchVisibilityStateChangeEvent):

LayoutTests:

  • fast/frames/page-visibility-crash-expected.txt: Added.
  • fast/frames/page-visibility-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r135730 r135740  
     12012-11-26  Abhishek Arya  <inferno@chromium.org>
     2
     3        Crash in Frame::dispatchVisibilityStateChangeEvent.
     4        https://bugs.webkit.org/show_bug.cgi?id=102053
     5
     6        Reviewed by Adam Barth.
     7
     8        * fast/frames/page-visibility-crash-expected.txt: Added.
     9        * fast/frames/page-visibility-crash.html: Added.
     10
    1112012-11-26  Thiago Marcos P. Santos  <thiago.santos@intel.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r135737 r135740  
     12012-11-26  Abhishek Arya  <inferno@chromium.org>
     2
     3        Crash in Frame::dispatchVisibilityStateChangeEvent.
     4        https://bugs.webkit.org/show_bug.cgi?id=102053
     5
     6        Reviewed by Adam Barth.
     7
     8        Child frame can go away inside webkitvisibilitychange
     9        event handler. Store it in a ref counted vector.
     10
     11        Test: fast/frames/page-visibility-crash.html
     12
     13        * page/Frame.cpp:
     14        (WebCore::Frame::dispatchVisibilityStateChangeEvent):
     15
    1162012-11-26  Hurnjoo Lee  <hurnjoo.lee@samsung.com>
    217
  • trunk/Source/WebCore/page/Frame.cpp

    r135529 r135740  
    658658    if (m_doc)
    659659        m_doc->dispatchVisibilityStateChangeEvent();
     660
     661    Vector<RefPtr<Frame> > childFrames;
    660662    for (Frame* child = tree()->firstChild(); child; child = child->tree()->nextSibling())
    661         child->dispatchVisibilityStateChangeEvent();
     663        childFrames.append(child);
     664
     665    for (size_t i = 0; i < childFrames.size(); ++i)
     666        childFrames[i]->dispatchVisibilityStateChangeEvent();
    662667}
    663668#endif
Note: See TracChangeset for help on using the changeset viewer.