Changeset 153107 in webkit


Ignore:
Timestamp:
Jul 24, 2013 5:57:19 PM (11 years ago)
Author:
andersca@apple.com
Message:

Crash when calling WKPageGetProcessIdentifier after aborted process launch
https://bugs.webkit.org/show_bug.cgi?id=119069
<rdar://problem/14494064>

Reviewed by Andreas Kling.

Source/WebKit2:

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::processIdentifier):
Check if the page is closed instead of checking whether we have a process - We'll always have a process.

(WebKit::WebPageProxy::isValid):
Make this const.

  • UIProcess/WebPageProxy.h:

Tools:

Add a test.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp: Added.

(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::TEST):

Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r153106 r153107  
     12013-07-24  Anders Carlsson  <andersca@apple.com>
     2
     3        Crash when calling WKPageGetProcessIdentifier after aborted process launch
     4        https://bugs.webkit.org/show_bug.cgi?id=119069
     5        <rdar://problem/14494064>
     6
     7        Reviewed by Andreas Kling.
     8
     9        * UIProcess/WebPageProxy.cpp:
     10        (WebKit::WebPageProxy::processIdentifier):
     11        Check if the page is closed instead of checking whether we have a process - We'll always have a process.
     12       
     13        (WebKit::WebPageProxy::isValid):
     14        Make this const.
     15
     16        * UIProcess/WebPageProxy.h:
     17
    1182013-07-24  Kwang Yul Seo  <skyul@company100.net>
    219
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r153096 r153107  
    376376PlatformProcessIdentifier WebPageProxy::processIdentifier() const
    377377{
    378     if (!m_process)
     378    if (!isValid())
    379379        return 0;
    380380
     
    382382}
    383383
    384 bool WebPageProxy::isValid()
     384bool WebPageProxy::isValid() const
    385385{
    386386    // A page that has been explicitly closed is never valid.
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r153096 r153107  
    634634    WebPageGroup* pageGroup() const { return m_pageGroup.get(); }
    635635
    636     bool isValid();
     636    bool isValid() const;
    637637
    638638    PassRefPtr<ImmutableArray> relatedPages() const;
  • trunk/Tools/ChangeLog

    r153093 r153107  
     12013-07-24  Anders Carlsson  <andersca@apple.com>
     2
     3        Crash when calling WKPageGetProcessIdentifier after aborted process launch
     4        https://bugs.webkit.org/show_bug.cgi?id=119069
     5        <rdar://problem/14494064>
     6
     7        Reviewed by Andreas Kling.
     8
     9        Add a test.
     10
     11        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
     12        * TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp: Added.
     13        (TestWebKitAPI::didFinishLoadForFrame):
     14        (TestWebKitAPI::TEST):
     15
    1162013-07-24  Zan Dobersek  <zdobersek@igalia.com>
    217
  • trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r153072 r153107  
    2727                1AE72F48173EB214006362F0 /* TerminateTwice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE72F47173EB214006362F0 /* TerminateTwice.cpp */; };
    2828                1AEDE22613E5E7E700E62FE8 /* InjectedBundleControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AEDE22413E5E7A000E62FE8 /* InjectedBundleControllerMac.mm */; };
     29                1AEF994917A09F5400998EF0 /* GetPIDAfterAbortedProcessLaunch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AEF994817A09F5300998EF0 /* GetPIDAfterAbortedProcessLaunch.cpp */; };
    2930                261516D615B0E60500A2C201 /* SetAndUpdateCacheModel.mm in Sources */ = {isa = PBXBuildFile; fileRef = 261516D515B0E60500A2C201 /* SetAndUpdateCacheModel.mm */; };
    3031                26300B1816755CD90066886D /* ListHashSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26300B1716755CD90066886D /* ListHashSet.cpp */; };
     
    325326                1AE72F47173EB214006362F0 /* TerminateTwice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TerminateTwice.cpp; sourceTree = "<group>"; };
    326327                1AEDE22413E5E7A000E62FE8 /* InjectedBundleControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InjectedBundleControllerMac.mm; sourceTree = "<group>"; };
     328                1AEF994817A09F5300998EF0 /* GetPIDAfterAbortedProcessLaunch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetPIDAfterAbortedProcessLaunch.cpp; sourceTree = "<group>"; };
    327329                261516D515B0E60500A2C201 /* SetAndUpdateCacheModel.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SetAndUpdateCacheModel.mm; sourceTree = "<group>"; };
    328330                26300B1716755CD90066886D /* ListHashSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ListHashSet.cpp; path = WTF/ListHashSet.cpp; sourceTree = "<group>"; };
     
    980982                                C0C5D3BC14598B6F00A802A6 /* GetBackingScaleFactor.mm */,
    981983                                C0C5D3BD14598B6F00A802A6 /* GetBackingScaleFactor_Bundle.mm */,
     984                                1AEF994817A09F5300998EF0 /* GetPIDAfterAbortedProcessLaunch.cpp */,
    982985                        );
    983986                        path = mac;
     
    11671170                                C0BD669D131D3CF700E18F2A /* ResponsivenessTimerDoesntFireEarly.cpp in Sources */,
    11681171                                C0ADBE8312FCA6AA00D2C129 /* RestoreSessionStateContainingFormData.cpp in Sources */,
     1172                                1AEF994917A09F5400998EF0 /* GetPIDAfterAbortedProcessLaunch.cpp in Sources */,
    11691173                                BC029B181486AD6400817DA9 /* RetainPtr.cpp in Sources */,
    11701174                                BC029B1C1486B25900817DA9 /* RetainPtr.mm in Sources */,
Note: See TracChangeset for help on using the changeset viewer.