Changeset 85549 in webkit


Ignore:
Timestamp:
May 2, 2011 4:41:47 PM (13 years ago)
Author:
beidson@apple.com
Message:

<rdar://problem/9340945> and https://bugs.webkit.org/show_bug.cgi?id=59973
In Aperture, a WebView might be dealloc'ed before it finishes loading.

Reviewed by Anders Carlsson.

../WebCore:

  • WebCore.exp.in:
  • platform/RuntimeApplicationChecks.cpp:

(WebCore::applicationIsAperture): Perform a com.apple.Aperture bundle check.

  • platform/RuntimeApplicationChecks.h:

../WebKit/mac:

  • WebView/WebView.mm:

(needsSelfRetainWhileLoadingQuirk):
(-[WebView _didStartProvisionalLoadForFrame:]): If we need the quirk, retain self.
(-[WebView _didFinishLoadForFrame:]): If we need the quirk, release self on a delay.
(-[WebView _didFailLoadWithError:forFrame:]): Ditto.
(-[WebView _didFailProvisionalLoadWithError:forFrame:]): Ditto.

Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r85540 r85549  
     12011-05-02  Brady Eidson  <beidson@apple.com>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        <rdar://problem/9340945> and https://bugs.webkit.org/show_bug.cgi?id=59973
     6        In Aperture, a WebView might be dealloc'ed before it finishes loading.
     7
     8        * WebCore.exp.in:
     9        * platform/RuntimeApplicationChecks.cpp:
     10        (WebCore::applicationIsAperture): Perform a com.apple.Aperture bundle check.
     11        * platform/RuntimeApplicationChecks.h:
     12
    1132011-05-02  Simon Fraser  <simon.fraser@apple.com>
    214
  • trunk/Source/WebCore/WebCore.exp.in

    r85428 r85549  
    557557__ZN7WebCore21UserContentURLPattern5parseERKN3WTF6StringE
    558558__ZN7WebCore21WindowsLatin1EncodingEv
     559__ZN7WebCore21applicationIsApertureEv
    559560__ZN7WebCore21findEventWithKeyStateEPNS_5EventE
    560561__ZN7WebCore21isBackForwardLoadTypeENS_13FrameLoadTypeE
  • trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp

    r83832 r85549  
    9797}
    9898
     99bool applicationIsAperture()
     100{
     101    static bool isAperture = mainBundleIsEqualTo("com.apple.Aperture");
     102    return isAperture;
     103}
     104
    99105} // namespace WebCore
  • trunk/Source/WebCore/platform/RuntimeApplicationChecks.h

    r83832 r85549  
    2929namespace WebCore {
    3030
     31bool applicationIsAOLInstantMessenger();
     32bool applicationIsAdobeInstaller();
     33bool applicationIsAperture();
    3134bool applicationIsAppleMail();
    32 bool applicationIsSafari();
    3335bool applicationIsMicrosoftMessenger();
    34 bool applicationIsAdobeInstaller();
    35 bool applicationIsAOLInstantMessenger();
    3636bool applicationIsMicrosoftMyDay();
    3737bool applicationIsMicrosoftOutlook();
     38bool applicationIsSafari();
    3839
    3940} // namespace WebCore
  • trunk/Source/WebKit/mac/ChangeLog

    r85515 r85549  
     12011-05-02  Brady Eidson  <beidson@apple.com>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        <rdar://problem/9340945> and https://bugs.webkit.org/show_bug.cgi?id=59973
     6        In Aperture, a WebView might be dealloc'ed before it finishes loading.
     7
     8        * WebView/WebView.mm:
     9        (needsSelfRetainWhileLoadingQuirk):
     10        (-[WebView _didStartProvisionalLoadForFrame:]): If we need the quirk, retain self.
     11        (-[WebView _didFinishLoadForFrame:]): If we need the quirk, release self on a delay.
     12        (-[WebView _didFailLoadWithError:forFrame:]): Ditto.
     13        (-[WebView _didFailProvisionalLoadWithError:forFrame:]): Ditto.
     14
    1152011-05-02  Adam Barth  <abarth@webkit.org>
    216
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r85515 r85549  
    13971397}
    13981398
     1399static bool needsSelfRetainWhileLoadingQuirk()
     1400{
     1401    static bool needsQuirk = applicationIsAperture();
     1402    return needsQuirk;
     1403}
    13991404
    14001405- (BOOL)_needsPreHTML5ParserQuirks
     
    18501855- (void)_didStartProvisionalLoadForFrame:(WebFrame *)frame
    18511856{
     1857    if (needsSelfRetainWhileLoadingQuirk())
     1858        [self retain];
     1859
    18521860    [self _willChangeBackForwardKeys];
    18531861    if (frame == [self mainFrame]){
     
    18711879- (void)_didFinishLoadForFrame:(WebFrame *)frame
    18721880{
     1881    if (needsSelfRetainWhileLoadingQuirk())
     1882        [self performSelector:@selector(release) withObject:nil afterDelay:0];
     1883       
    18731884    [self _didChangeBackForwardKeys];
    18741885    if (frame == [self mainFrame]){
     
    18821893- (void)_didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame
    18831894{
     1895    if (needsSelfRetainWhileLoadingQuirk())
     1896        [self performSelector:@selector(release) withObject:nil afterDelay:0];
     1897
    18841898    [self _didChangeBackForwardKeys];
    18851899    if (frame == [self mainFrame]){
     
    18931907- (void)_didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame
    18941908{
     1909    if (needsSelfRetainWhileLoadingQuirk())
     1910        [self performSelector:@selector(release) withObject:nil afterDelay:0];
     1911
    18951912    [self _didChangeBackForwardKeys];
    18961913    if (frame == [self mainFrame]){
Note: See TracChangeset for help on using the changeset viewer.