servo: Merge #14589 - Reduce calls into arbitrary code with the ScriptThread::documents borrow held (from servo:harden-script); r=jdm+Ms2ger
Source-Repo: https://github.com/servo/servo Source-Revision: 0c56499bdc5c92bac44f8c33e4781899c34d64e1
This commit is contained in:
@@ -542,6 +542,9 @@ def check_rust(file_name, lines):
|
||||
lambda match, line: line.startswith('use ')),
|
||||
(r"^\s*else {", "else braces should be on the same line", no_filter),
|
||||
(r"[^$ ]\([ \t]", "extra space after (", no_filter),
|
||||
# This particular pattern is not reentrant-safe in script_thread.rs
|
||||
(r"match self.documents.borrow", "use a separate variable for the match expression",
|
||||
lambda match, line: file_name.endswith('script_thread.rs')),
|
||||
]
|
||||
|
||||
for pattern, message, filter_func in regex_rules:
|
||||
|
||||
Reference in New Issue
Block a user