Unreviewed, rolling out r204243.
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Aug 2016 18:09:21 +0000 (18:09 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Aug 2016 18:09:21 +0000 (18:09 +0000)
Caused some layout test failures

Reverted changeset:

"Write API test to cover crash fix in r204135"
https://bugs.webkit.org/show_bug.cgi?id=160587
http://trac.webkit.org/changeset/204243

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204841 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm

index b5c1613..fbf6b1e 100644 (file)
@@ -1,3 +1,15 @@
+2016-08-23  Chris Dumez  <cdumez@apple.com>
+
+        Unreviewed, rolling out r204243.
+
+        Caused some layout test failures
+
+        Reverted changeset:
+
+        "Write API test to cover crash fix in r204135"
+        https://bugs.webkit.org/show_bug.cgi?id=160587
+        http://trac.webkit.org/changeset/204243
+
 2016-08-23  Hunseop Jeong  <hs85.jeong@samsung.com>
 
         [EFL] URTBF after r204743.
index 011fe84..7cf79dd 100644 (file)
@@ -2353,6 +2353,7 @@ void WebPageProxy::terminateProcess()
         return;
 
     m_process->requestTermination();
+    resetStateAfterProcessExited();
 }
 
 SessionState WebPageProxy::sessionState(const std::function<bool (WebBackForwardListItem&)>& filter) const
index 575c7ab..16ec28e 100644 (file)
@@ -805,7 +805,10 @@ void WebProcessProxy::requestTermination()
 
     ChildProcessProxy::terminate();
 
-    didClose(*connection());
+    if (webConnection())
+        webConnection()->didClose();
+
+    shutDown();
 }
 
 void WebProcessProxy::enableSuddenTermination()
index e98e614..360168b 100644 (file)
@@ -1,3 +1,15 @@
+2016-08-23  Chris Dumez  <cdumez@apple.com>
+
+        Unreviewed, rolling out r204243.
+
+        Caused some layout test failures
+
+        Reverted changeset:
+
+        "Write API test to cover crash fix in r204135"
+        https://bugs.webkit.org/show_bug.cgi?id=160587
+        http://trac.webkit.org/changeset/204243
+
 2016-08-23  Rawinder Singh  <rawinder.singh-webkit@cisra.canon.com.au>
 
         Order feature option list in FeatureList.pm
index 5193a78..d5c8fd7 100644 (file)
 
 #import <WebKit/WKNavigationPrivate.h>
 #import <WebKit/WKNavigationDelegate.h>
-#import <WebKit/WKProcessPoolPrivate.h>
 #import <WebKit/WKWebView.h>
-#import <WebKit/WKWebViewConfigurationPrivate.h>
-#import <WebKit/WKWebViewPrivate.h>
-#import <WebKit/_WKProcessPoolConfiguration.h>
 #import <wtf/RetainPtr.h>
 #import "PlatformUtilities.h"
 #import "Test.h"
@@ -39,7 +35,6 @@
 #if WK_API_ENABLED
 
 static bool isDone;
-static std::function<void()> crashHandler;
 static RetainPtr<WKNavigation> currentNavigation;
 
 @interface NavigationDelegate : NSObject <WKNavigationDelegate>
@@ -65,11 +60,6 @@ static RetainPtr<WKNavigation> currentNavigation;
     isDone = true;
 }
 
-- (void)webViewWebContentProcessDidTerminate:(WKWebView *)webView
-{
-    crashHandler();
-}
-
 @end
 
 TEST(WKNavigation, NavigationDelegate)
@@ -197,48 +187,4 @@ TEST(WKNavigation, DecidePolicyForPageCacheNavigation)
     ASSERT_TRUE([delegate decidedPolicyForBackForwardNavigation]);
 }
 
-TEST(WKNavigation, WebContentProcessDidTerminate)
-{
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    RetainPtr<_WKProcessPoolConfiguration> poolConfiguration = adoptNS([[_WKProcessPoolConfiguration alloc] init]);
-    poolConfiguration.get().maximumProcessCount = 1;
-    RetainPtr<WKProcessPool> processPool = adoptNS([[WKProcessPool alloc] _initWithConfiguration:poolConfiguration.get()]);
-
-    RetainPtr<WKWebViewConfiguration> configuration1 = adoptNS([[WKWebViewConfiguration alloc] init]);
-    configuration1.get().processPool = processPool.get();
-    RetainPtr<WKWebView> webView1 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration1.get()]);
-
-    RetainPtr<NavigationDelegate> delegate1 = adoptNS([[NavigationDelegate alloc] init]);
-    [webView1 setNavigationDelegate:delegate1.get()];
-
-    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"data:text/html,1"]];
-
-    isDone = false;
-    currentNavigation = [webView1 loadRequest:request];
-    TestWebKitAPI::Util::run(&isDone);
-
-    RetainPtr<WKWebViewConfiguration> configuration2 = adoptNS([[WKWebViewConfiguration alloc] init]);
-    configuration2.get().processPool = processPool.get();
-    configuration2.get()._relatedWebView = webView1.get();
-    RetainPtr<WKWebView> webView2 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration2.get()]);
-
-    RetainPtr<NavigationDelegate> delegate2 = adoptNS([[NavigationDelegate alloc] init]);
-    [webView2 setNavigationDelegate:delegate2.get()];
-
-    isDone = false;
-    currentNavigation = [webView2 loadRequest:request];
-    TestWebKitAPI::Util::run(&isDone);
-
-    bool didTerminate = false;
-    crashHandler = [&] {
-        webView1 = nullptr;
-        webView2 = nullptr;
-        [pool drain]; // Make sure the views get deallocated.
-        didTerminate = true;
-    };
-
-    [webView2 _killWebContentProcessAndResetState];
-    TestWebKitAPI::Util::run(&didTerminate);
-}
-
 #endif