[mparch] Update PRESUBMIT.py for IsCrossOriginToMainFrame
Adds this method to the list of issues that will be flagged for MPArch. Bug: 1318055 Change-Id: I8c508d055f6554bbf746c877db3d42e3fb80f3e7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3597213 Reviewed-by: Kevin McNee <mcnee@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Commit-Queue: Ian Vollick <vollick@chromium.org> Cr-Commit-Position: refs/heads/main@{#994440}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
d0f41c1ae6
commit
dba956c58a
14
PRESUBMIT.py
14
PRESUBMIT.py
@@ -5667,13 +5667,13 @@ def CheckMPArchApiUsage(input_api, output_api):
|
||||
presence of MPArch features such as bfcache, prerendering, and fenced frames.
|
||||
"""
|
||||
|
||||
# Only consider top-level directories that (1) can use content APIs, (2)
|
||||
# apply to desktop or android chrome, and (3) are known to have a significant
|
||||
# number of uses of the APIs of concern.
|
||||
# Only consider top-level directories that (1) can use content APIs or
|
||||
# problematic blink APIs, (2) apply to desktop or android chrome, and (3)
|
||||
# are known to have a significant number of uses of the APIs of concern.
|
||||
files_to_check = (
|
||||
r'^(chrome|components|content|extensions)[\\/].+%s' %
|
||||
r'^(chrome|components|content|extensions|third_party[\\/]blink[\\/]renderer)[\\/].+%s' %
|
||||
_IMPLEMENTATION_EXTENSIONS,
|
||||
r'^(chrome|components|content|extensions)[\\/].+%s' %
|
||||
r'^(chrome|components|content|extensions|third_party[\\/]blink[\\/]renderer)[\\/].+%s' %
|
||||
_HEADER_EXTENSIONS,
|
||||
)
|
||||
files_to_skip = (_EXCLUDED_PATHS + _TEST_CODE_EXCLUDED_PATHS +
|
||||
@@ -5723,11 +5723,15 @@ def CheckMPArchApiUsage(input_api, output_api):
|
||||
concerning_ftn_methods = [
|
||||
'IsMainFrame',
|
||||
]
|
||||
concerning_blink_frame_methods = [
|
||||
'IsCrossOriginToMainFrame',
|
||||
]
|
||||
concerning_method_pattern = input_api.re.compile(r'(' + r'|'.join(
|
||||
item for sublist in [
|
||||
concerning_wco_methods, concerning_nav_handle_methods,
|
||||
concerning_web_contents_methods, concerning_rfh_methods,
|
||||
concerning_rfhi_methods, concerning_ftn_methods,
|
||||
concerning_blink_frame_methods,
|
||||
] for item in sublist) + r')\(')
|
||||
|
||||
used_apis = set()
|
||||
|
Reference in New Issue
Block a user