Changeset 28503 in webkit


Ignore:
Timestamp:
Dec 6, 2007 5:04:43 PM (16 years ago)
Author:
Adam Roben
Message:

Fix <rdar://5615283> Crash in WebFrame::receivedPolicyDecision

WebKit/mac:

Remove some assertions we know can fire and replace them with a FIXME

Reviewed by Anders.

  • WebCoreSupport/WebFrameLoaderClient.mm:

WebKit/win:

Fix <rdar://5615283> Crash in WebFrame::receivedPolicyDecision

It's possible for a second policy listener to be created while we're
waiting for a decision on the first policy listener. In this case we
would crash when the first policy listener had a decision made. Mac
WebKit already handles this by invalidating any existing policy
listener when creating a new one.

A test case is coming in a future commit.

Reviewed by Anders.

  • WebFrame.cpp: (WebFrame::setUpPolicyListener): Copy the Mac behavior of invalidating any existing policy listener, and remove some assertions that we know can fire.
Location:
trunk/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/mac/ChangeLog

    r28501 r28503  
     12007-12-06  Adam Roben  <aroben@apple.com>
     2
     3        Remove some assertions we know can fire and replace them with a FIXME
     4
     5        Reviewed by Anders.
     6
     7        * WebCoreSupport/WebFrameLoaderClient.mm:
     8
    192007-12-06  Timothy Hatcher  <timothy@apple.com>
    210
  • trunk/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm

    r28399 r28503  
    10611061RetainPtr<WebFramePolicyListener> WebFrameLoaderClient::setUpPolicyListener(FramePolicyFunction function)
    10621062{
    1063     ASSERT(!m_policyListener);
    1064     ASSERT(!m_policyFunction);
     1063    // FIXME: <rdar://5634381> We need to support multiple active policy listeners.
    10651064
    10661065    [m_policyListener.get() invalidate];
  • trunk/WebKit/win/ChangeLog

    r28498 r28503  
     12007-12-06  Adam Roben  <aroben@apple.com>
     2
     3        Fix <rdar://5615283> Crash in WebFrame::receivedPolicyDecision
     4
     5        It's possible for a second policy listener to be created while we're
     6        waiting for a decision on the first policy listener. In this case we
     7        would crash when the first policy listener had a decision made. Mac
     8        WebKit already handles this by invalidating any existing policy
     9        listener when creating a new one.
     10
     11        A test case is coming in a future commit.
     12
     13        Reviewed by Anders.
     14
     15        * WebFrame.cpp:
     16        (WebFrame::setUpPolicyListener): Copy the Mac behavior of invalidating
     17        any existing policy listener, and remove some assertions that we know
     18        can fire.
     19
    1202007-12-06  Adam Roben  <aroben@apple.com>
    221
  • trunk/WebKit/win/WebFrame.cpp

    r28468 r28503  
    19861986COMPtr<WebFramePolicyListener> WebFrame::setUpPolicyListener(WebCore::FramePolicyFunction function)
    19871987{
    1988     ASSERT(!d->m_policyListener);
    1989     ASSERT(!d->m_policyFunction);
     1988    // FIXME: <rdar://5634381> We need to support multiple active policy listeners.
     1989
     1990    if (d->m_policyListener)
     1991        d->m_policyListener->invalidate();
    19901992
    19911993    Frame* coreFrame = core(this);
Note: See TracChangeset for help on using the changeset viewer.