WebKit Bugzilla
Attachment 346866 Details for
Bug 188453
: REGRESSION(234640) Loading stalls in environments without SafariSafeBrowsing framework
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188453-20180809153325.patch (text/plain), 4.43 KB, created by
Alex Christensen
on 2018-08-09 15:33:26 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2018-08-09 15:33:26 PDT
Size:
4.43 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 234728) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,14 @@ >+2018-08-09 Alex Christensen <achristensen@webkit.org> >+ >+ REGRESSION(234640) Loading stalls in environments without SafariSafeBrowsing framework >+ https://bugs.webkit.org/show_bug.cgi?id=188453 >+ <rdar://problem/43102553> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/Cocoa/WebPageProxyCocoa.mm: >+ (WebKit::WebPageProxy::beginSafeBrowsingCheck): >+ > 2018-08-09 Per Arne Vollan <pvollan@apple.com> > > DisplayRefreshMonitorMac should hold a weak pointer to WebPage. >Index: Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm (revision 234728) >+++ Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm (working copy) >@@ -74,7 +74,10 @@ void WebPageProxy::loadRecentSearches(co > void WebPageProxy::beginSafeBrowsingCheck(const URL& url, WebFramePolicyListenerProxy& listener) > { > #if HAVE(SAFE_BROWSING) >- [[SSBLookupContext sharedLookupContext] lookUpURL:url completionHandler:BlockPtr<void(SSBLookupResult *, NSError *)>::fromCallable([listener = makeRef(listener)] (SSBLookupResult *result, NSError *error) mutable { >+ SSBLookupContext *context = [SSBLookupContext sharedLookupContext]; >+ if (!context) >+ return listener.didReceiveSafeBrowsingResults({ }); >+ [context lookUpURL:url completionHandler:BlockPtr<void(SSBLookupResult *, NSError *)>::fromCallable([listener = makeRef(listener)] (SSBLookupResult *result, NSError *error) mutable { > RunLoop::main().dispatch([listener = WTFMove(listener), result = retainPtr(result), error = retainPtr(error)] { > if (error) { > listener->didReceiveSafeBrowsingResults({ }); >Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 234738) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,16 @@ >+2018-08-09 Alex Christensen <achristensen@webkit.org> >+ >+ REGRESSION(234640) Loading stalls in environments without SafariSafeBrowsing framework >+ https://bugs.webkit.org/show_bug.cgi?id=188453 >+ <rdar://problem/43102553> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm: >+ (TEST): >+ (+[NullLookupContext sharedLookupContext]): >+ (TestWebKitAPI::TEST): Deleted. >+ > 2018-08-09 Alex Christensen <achristensen@webkit.org> > > WKURLSchemeHandler crashes when sent errors with sync XHR >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm (revision 234728) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm (working copy) >@@ -29,6 +29,7 @@ > > #import "ClassMethodSwizzler.h" > #import "PlatformUtilities.h" >+#import "TestWKWebView.h" > #import <WebKit/WKNavigationDelegate.h> > #import <WebKit/WKWebViewPrivate.h> > #import <wtf/RetainPtr.h> >@@ -143,11 +144,9 @@ - (void)lookUpURL:(NSURL *)URL completio > > @end > >-namespace TestWebKitAPI { >- > TEST(WebKit, SafeBrowsing) > { >- ClassMethodSwizzler swizzler(objc_getClass("SSBLookupContext"), @selector(sharedLookupContext), [TestLookupContext methodForSelector:@selector(sharedLookupContext)]); >+ TestWebKitAPI::ClassMethodSwizzler swizzler(objc_getClass("SSBLookupContext"), @selector(sharedLookupContext), [TestLookupContext methodForSelector:@selector(sharedLookupContext)]); > > auto navigationDelegate = adoptNS([[SafeBrowsingNavigationDelegate alloc] init]); > auto webView = adoptNS([[WKWebView alloc] init]); >@@ -158,7 +157,21 @@ TEST(WebKit, SafeBrowsing) > > TestWebKitAPI::Util::run(&done); > } >- >-} // namespace TestWebKitAPI >+ >+@interface NullLookupContext : NSObject >+@end >+@implementation NullLookupContext >++ (NullLookupContext *)sharedLookupContext >+{ >+ return nil; >+} >+@end >+ >+TEST(WebKit, NoSafeBrowsing) >+{ >+ TestWebKitAPI::ClassMethodSwizzler swizzler(objc_getClass("SSBLookupContext"), @selector(sharedLookupContext), [NullLookupContext methodForSelector:@selector(sharedLookupContext)]); >+ auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 800, 600)]); >+ [webView synchronouslyLoadTestPageNamed:@"simple"]; >+} > > #endif // WK_API_ENABLED
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
cdumez
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188453
: 346866