Attention is currently required from: Camillo Bruni.
Camillo Bruni uploaded patch set #7 to this change.
[idl] Use new v8::Object::GetCreationContextChecked
v8::Object::CreationContext is deprecated.
There isn't always a creation context available and we have to
explicitly handle the returned MaybeLocal<Context>.
Bug: 1166077, v8:11451, v8:11165
Change-Id: Ia406cc7d62e0908d2d83ee88df2a7f5912a54119
---
M third_party/blink/renderer/bindings/scripts/bind_gen/interface.py
M third_party/blink/renderer/bindings/scripts/bind_gen/callback_function.py
2 files changed, 18 insertions(+), 3 deletions(-)
To view, visit change 3243947. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Camillo Bruni.
Patch set 7:Commit-Queue +2
Chromium LUCI CQ submitted this change.
5 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
[idl] Use new v8::Object::GetCreationContextChecked
v8::Object::CreationContext is deprecated.
There isn't always a creation context available and we have to
explicitly handle the returned MaybeLocal<Context>.
Bug: 1166077, v8:11451, v8:11165
Change-Id: Ia406cc7d62e0908d2d83ee88df2a7f5912a54119
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3243947
Commit-Queue: Camillo Bruni <cbr...@chromium.org>
Reviewed-by: Yuki Shiino <yukis...@chromium.org>
Reviewed-by: Kentaro Hara <har...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#935806}
---
M third_party/blink/renderer/bindings/scripts/bind_gen/interface.py
M third_party/blink/renderer/bindings/scripts/bind_gen/callback_function.py
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/third_party/blink/renderer/bindings/scripts/bind_gen/callback_function.py b/third_party/blink/renderer/bindings/scripts/bind_gen/callback_function.py
index 607ff42..5af1d38 100644
--- a/third_party/blink/renderer/bindings/scripts/bind_gen/callback_function.py
+++ b/third_party/blink/renderer/bindings/scripts/bind_gen/callback_function.py
@@ -251,7 +251,7 @@
body=[
T("v8::HandleScope handle_scope(${isolate});"),
T("v8::Context::Scope context_scope("
- "CallbackObject()->CreationContext());"),
+ "CallbackObject()->GetCreationContextChecked());"),
T("${exception_state}.ThrowException("
"static_cast<ExceptionCode>(ESErrorType::kError), "
"\"The provided callback is no longer runnable.\");"),
diff --git a/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py b/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py
index 1cd69431..81ed441 100644
--- a/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py
+++ b/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py
@@ -334,8 +334,9 @@
"V8PerIsolateData::From(${isolate});")),
S("property_name",
"const char* const ${property_name} = \"${property.identifier}\";"),
- S("receiver_context", ("v8::Local<v8::Context> ${receiver_context} = "
- "${v8_receiver}->CreationContext();")),
+ S("receiver_context",
+ ("v8::Local<v8::Context> ${receiver_context} = "
+ "${v8_receiver}->GetCreationContextChecked();")),
S("receiver_script_state",
("ScriptState* ${receiver_script_state} = "
"ScriptState::From(${receiver_context});")),
To view, visit change 3243947. To unsubscribe, or for help writing mail filters, visit settings.