navigation_params->sandbox_origin_token =Is this needed if we're just going to reuse the same origin / the current origin?
} else if (sandbox_origin_token_.has_value()) {We want to make sure we never reuse the token after the creation, even for other commits using the same DocumentLoader. I wonder if we can save this as a unique_ptr all the way from FrameRoutingInfo and just take the value at creation?
if (((policy_container->GetPolicies().sandbox_flags &nit: remove extra parentheses?
network::mojom::blink::WebSandboxFlags::kNone)) {
if (sandbox_origin_token.has_value()) {
navigation_params->sandbox_origin_token = sandbox_origin_token;
}
navigation_params->origin_to_commit =
WebSecurityOrigin(sandbox_new_window_origin);Monica ChintalaIs it possible to check that only one of `sandbox_origin_token`, `sandbox_new_window_origin`, `origin_to_commit` is set? Also I wonder if it's possible to also just pass in a `sandbox_origin_token` for the `sandbox_new_window_origin` case to reduce the amount of different params. So we pass a token in the CreateNewWindowReply instead of an origin, and create the origin in DocumentLoader, same as the iframe case. But maybe we won't have the correct precursor?
Rakina Zata AmniUpdated the code to check sandbox_origin_token or sandbox_main_frame_origin (changed param name from sandbox_new_window_origin) as one of it should exist.
For other question, yes we will be losing the precursors info in that case so had to use sandbox_new_window_origin param for that case.
Thanks, just to check on the precursor -- do you know if it's not possible to get the owner origin from the owner document here? https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/loader/document_loader.cc;l=2836;drc=eda3daef3fdb7666dd1e521a0490c2eafbde5921
I thought that would be set correctly since we'll get here synchronously from when the window is created from the opener, then we can derive the opaque origin using the owner document as base + just passing in a token, just like the iframe case?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |