Skip to content

Commit

Permalink
Fix branch test build after r222431.
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=177411

* TestWebKitAPI/Tests/WebKit2Cocoa/JavaScriptDuringNavigation.mm:
(-[JSNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[JSNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
Just do string comparison to avoid this error on some OSes:
error: instance method '-isEqualTo:' not found (return type defaults to 'id')



Canonical link: https://commits.webkit.org/191388.158@safari-604-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-604-branch@222453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
achristensen07 committed Sep 25, 2017
1 parent b31fcc1 commit 1660f2c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,15 @@
2017-09-25 Alex Christensen <achristensen@webkit.org>

Fix branch test build after r222431.
https://bugs.webkit.org/show_bug.cgi?id=177411

* TestWebKitAPI/Tests/WebKit2Cocoa/JavaScriptDuringNavigation.mm:
(-[JSNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[JSNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
Just do string comparison to avoid this error on some OSes:
error: instance method '-isEqualTo:' not found (return type defaults to 'id')


2017-09-23 Alex Christensen <achristensen@webkit.org>

REGRESSION(r214201): WebProcess hangs during policy decisions
Expand Down
Expand Up @@ -50,7 +50,7 @@ - (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNav

- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler
{
if ([navigationAction.request.URL isEqualTo:secondURL.get()]) {
if ([navigationAction.request.URL.absoluteString isEqualToString:[secondURL absoluteString]]) {
[webView evaluateJavaScript:@"alert(document.location);" completionHandler:^(id, NSError *) {
decisionHandler(WKNavigationActionPolicyAllow);
}];
Expand All @@ -60,7 +60,7 @@ - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigati

- (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler
{
if ([navigationResponse.response.URL isEqualTo:secondURL.get()]) {
if ([navigationResponse.response.URL.absoluteString isEqualToString:[secondURL absoluteString]]) {
[webView evaluateJavaScript:@"alert(document.location);" completionHandler:^(id, NSError *) {
decisionHandler(WKNavigationResponsePolicyAllow);
}];
Expand Down

0 comments on commit 1660f2c

Please sign in to comment.