Update to Chromium version 110.0.5481.0 (#1084008)

This commit is contained in:
Marshall Greenblatt
2023-01-02 18:34:43 -05:00
parent e646827d92
commit d04b5d4f87
84 changed files with 607 additions and 762 deletions

View File

@@ -46,6 +46,19 @@
namespace blink_glue {
namespace {
blink::ExecutionContext* GetExecutionContext(v8::Local<v8::Context> context) {
blink::LocalFrame* frame = blink::ToLocalFrameIfNotDetached(context);
if (frame &&
frame->DomWindow()->CanExecuteScripts(blink::kAboutToExecuteScript)) {
return frame->GetDocument()->GetExecutionContext();
}
return nullptr;
}
} // namespace
const int64_t kInvalidFrameId = -1;
bool CanGoBack(blink::WebView* view) {
@@ -73,7 +86,7 @@ void GoBack(blink::WebView* view) {
blink::Frame* core_frame = blink::WebFrame::ToCoreFrame(*main_frame);
blink::To<blink::LocalFrame>(core_frame)
->GetLocalFrameHostRemote()
.GoToEntryAtOffset(-1, true /* has_user_gesture */);
.GoToEntryAtOffset(-1, /*has_user_gesture=*/true, absl::nullopt);
}
}
}
@@ -89,7 +102,7 @@ void GoForward(blink::WebView* view) {
blink::Frame* core_frame = blink::WebFrame::ToCoreFrame(*main_frame);
blink::To<blink::LocalFrame>(core_frame)
->GetLocalFrameHostRemote()
.GoToEntryAtOffset(1, true /* has_user_gesture */);
.GoToEntryAtOffset(1, /*has_user_gesture=*/true, absl::nullopt);
}
}
}
@@ -170,13 +183,9 @@ v8::MaybeLocal<v8::Value> CallV8Function(v8::Local<v8::Context> context,
// Execute the function call using the V8ScriptRunner so that inspector
// instrumentation works.
blink::LocalFrame* frame = blink::ToLocalFrameIfNotDetached(context);
DCHECK(frame);
if (frame &&
frame->DomWindow()->CanExecuteScripts(blink::kAboutToExecuteScript)) {
if (auto execution_context = GetExecutionContext(context)) {
func_rv = blink::V8ScriptRunner::CallFunction(
function, frame->GetDocument()->GetExecutionContext(), receiver, argc,
args, isolate);
function, execution_context, receiver, argc, args, isolate);
}
return func_rv;
@@ -225,6 +234,13 @@ v8::Local<v8::Value> ExecuteV8ScriptAndReturnValue(
return v8::Local<v8::Value>();
}
v8::MicrotaskQueue* GetMicrotaskQueue(v8::Local<v8::Context> context) {
if (auto execution_context = GetExecutionContext(context)) {
return execution_context->GetMicrotaskQueue();
}
return nullptr;
}
bool IsScriptForbidden() {
return blink::ScriptForbiddenScope::IsScriptForbidden();
}