Commit a5f3b935 authored by Matt Menke's avatar Matt Menke Committed by Chromium LUCI CQ

Make ContentAutofillDriver::IsolationInfo() use the pending value.

RenderFrameHostImpl was recently modified to only update the value
GetIsolationInfoForSubresources() returns to only return the value of
the committed page. This matches the behavior of GetCommittedOrigin(),
and the old behavior of ComputeSiteForCookies (which was accidentally
changed a couple months back), so callers will get a consistent view of
the world.

This API is necessarily racy, since neither RenderFrameHostImpl nor the
caller generally know whether the call wants the old IsolationInfo
value, or the new one.

ContentAutofillDriver seems to be calling this method before a page
commits, while it's still pending. This CL switches it over to using
the pending IsolationInfo value, instead of the committed one, which
should match previous behavior. Once RenderDocument is implemented,
consumers will hopefully be bound to a document instead of a frame,
which will resolve the ambiguities/raciness with this API.

Fixed: 1157517
Change-Id: I938a23a08a96e4ad4e79798b9e930d2a321b9328
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2586237
Commit-Queue: Maxim Kolosovskiy  <kolos@chromium.org>
Auto-Submit: Matt Menke <mmenke@chromium.org>
Reviewed-by: default avatarMaxim Kolosovskiy  <kolos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836611}
parent 3c88e767
...@@ -239,7 +239,7 @@ gfx::RectF ContentAutofillDriver::TransformBoundingBoxToViewportCoordinates( ...@@ -239,7 +239,7 @@ gfx::RectF ContentAutofillDriver::TransformBoundingBoxToViewportCoordinates(
} }
net::IsolationInfo ContentAutofillDriver::IsolationInfo() { net::IsolationInfo ContentAutofillDriver::IsolationInfo() {
return render_frame_host_->GetIsolationInfoForSubresources(); return render_frame_host_->GetPendingIsolationInfoForSubresources();
} }
void ContentAutofillDriver::FormsSeen(const std::vector<FormData>& forms) { void ContentAutofillDriver::FormsSeen(const std::vector<FormData>& forms) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment