Changeset 234276 in webkit
- Timestamp:
- Jul 26, 2018 2:44:05 PM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r234272 r234276 1 2018-07-26 Alex Christensen <achristensen@webkit.org> 2 3 Fix assertions introduced in r234210 4 https://bugs.webkit.org/show_bug.cgi?id=188074 5 6 Reviewed by Chris Dumez. 7 8 There is a client that uses WKFramePolicyListenerUseWithPolicies to send website policies as 9 a response to the WKPageNavigationClient's decidePolicyForNavigationResponse. That is wasting 10 effort to generate policies that don't change anything. Once that client adopts WKWebView 11 they won't be able to do this any more, so temporarily remove the assertion. 12 Also, make the assertion about process swapping a release assert to prevent that client 13 from adopting WKFramePolicyListenerUseInNewProcessWithPolicies for navigation responses. 14 It should only be used for navigation actions. 15 16 * UIProcess/WebPageProxy.cpp: 17 (WebKit::WebPageProxy::decidePolicyForNewWindowAction): 18 (WebKit::WebPageProxy::decidePolicyForResponse): 19 1 20 2018-07-26 Commit Queue <commit-queue@webkit.org> 2 21 -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r234268 r234276 4083 4083 MESSAGE_CHECK_URL(request.url()); 4084 4084 4085 auto listener = makeRef(frame->setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), listenerID, frame = makeRef(*frame)] (WebCore::PolicyAction policyAction, API::WebsitePolicies* policies, ShouldProcessSwapIfPossible swap) {4086 ASSERT_UNUSED(policies, !policies);4087 ASSERT_UNUSED(swap,swap == ShouldProcessSwapIfPossible::No);4085 auto listener = makeRef(frame->setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), listenerID, frame = makeRef(*frame)] (WebCore::PolicyAction policyAction, API::WebsitePolicies*, ShouldProcessSwapIfPossible swap) { 4086 // FIXME: Assert the API::WebsitePolicies* is nullptr here once clients of WKFramePolicyListenerUseWithPolicies go away. 4087 RELEASE_ASSERT(swap == ShouldProcessSwapIfPossible::No); 4088 4088 receivedPolicyDecision(policyAction, frame.get(), listenerID, nullptr, std::nullopt); 4089 4089 })); … … 4116 4116 4117 4117 RefPtr<API::Navigation> navigation = navigationID ? &m_navigationState->navigation(navigationID) : nullptr; 4118 auto listener = makeRef(frame->setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), frame = makeRef(*frame), listenerID, navigation = WTFMove(navigation)] (WebCore::PolicyAction policyAction, API::WebsitePolicies* policies, ShouldProcessSwapIfPossible swap) {4119 ASSERT_UNUSED(policies, !policies);4120 ASSERT_UNUSED(swap,swap == ShouldProcessSwapIfPossible::No);4118 auto listener = makeRef(frame->setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), frame = makeRef(*frame), listenerID, navigation = WTFMove(navigation)] (WebCore::PolicyAction policyAction, API::WebsitePolicies*, ShouldProcessSwapIfPossible swap) { 4119 // FIXME: Assert the API::WebsitePolicies* is nullptr here once clients of WKFramePolicyListenerUseWithPolicies go away. 4120 RELEASE_ASSERT(swap == ShouldProcessSwapIfPossible::No); 4121 4121 receivedPolicyDecision(policyAction, frame.get(), listenerID, navigation.get(), std::nullopt); 4122 4122 }));
Note: See TracChangeset
for help on using the changeset viewer.