IsCrossOriginToMainFrame renamed due to MPArch
Chromium change: https://chromium.googlesource.com/chromium/src/+/6eb75d3c7b9ef4f90d7ee13471e0aac9f820967b commit 6eb75d3c7b9ef4f90d7ee13471e0aac9f820967b Author: Ian Vollick <vollick@chromium.org> Date: Fri Apr 22 21:44:59 2022 +0000 [mparch] Add and start using Frame::IsCrossOriginToOutermostMainFrame With MPArch we can have a nested main frame, so for cases when we want to check that an embedded frame is cross-origin with respect to the outermost main frame, we should use IsCrossOriginToOutermostMainFrame. This CL changes a number of cases where the semantics appear to match outermost. This should have no effect outside the use of MPArch-based nested frame trees (only fenced frames at the moment). However, this is an interim step: the vast majority of current IsCrossOriginToMainFrame usages should be comparing with the outermost main frame, not the nearest. Ultimately, we will rename IsCrossOriginToMainFrame -> IsCrossOriginToNearestMainFrame, which will be used rarely, with all other instances using the 'outermost' check. A TODO has been added over IsCrossOriginToMainFrame about this next step. TODOs have been added for test coverage of these changes, similar to the approach taken in crrev.com/c/2988476 and crrev.com/c/3577677. More will be added after the mass rename in the sebsequent CL. Bug: 1318055
This commit is contained in:
@@ -47,7 +47,7 @@ void BraveWalletRenderFrameObserver::DidCreateScriptContext(
|
||||
}
|
||||
// Wallet provider objects won't be generated for third party iframe
|
||||
if (!render_frame()->IsMainFrame() &&
|
||||
render_frame()->GetWebFrame()->IsCrossOriginToMainFrame()) {
|
||||
render_frame()->GetWebFrame()->IsCrossOriginToOutermostMainFrame()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user