[idl] Use new v8::Object::GetCreationContextChecked [chromium/src : main]

0 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Camillo Bruni (Gerrit)

ungelesen,
28.10.2021, 03:49:5628.10.21
an blink-revie...@chromium.org, blink-...@chromium.org

Attention is currently required from: Camillo Bruni.

Camillo Bruni uploaded patch set #7 to this change.

View 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.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ia406cc7d62e0908d2d83ee88df2a7f5912a54119
Gerrit-Change-Number: 3243947
Gerrit-PatchSet: 7
Gerrit-Owner: Camillo Bruni <cbr...@chromium.org>
Gerrit-Reviewer: Camillo Bruni <cbr...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Yuki Shiino <yukis...@chromium.org>
Gerrit-Attention: Camillo Bruni <cbr...@chromium.org>
Gerrit-MessageType: newpatchset

Camillo Bruni (Gerrit)

ungelesen,
28.10.2021, 04:31:5728.10.21
an blink-revie...@chromium.org, blink-...@chromium.org, Yuki Shiino, Kentaro Hara, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Camillo Bruni.

Patch set 7:Commit-Queue +2

View Change

    To view, visit change 3243947. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ia406cc7d62e0908d2d83ee88df2a7f5912a54119
    Gerrit-Change-Number: 3243947
    Gerrit-PatchSet: 7
    Gerrit-Owner: Camillo Bruni <cbr...@chromium.org>
    Gerrit-Reviewer: Camillo Bruni <cbr...@chromium.org>
    Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
    Gerrit-Reviewer: Yuki Shiino <yukis...@chromium.org>
    Gerrit-Attention: Camillo Bruni <cbr...@chromium.org>
    Gerrit-Comment-Date: Thu, 28 Oct 2021 08:31:44 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Chromium LUCI CQ (Gerrit)

    ungelesen,
    28.10.2021, 05:49:5728.10.21
    an Camillo Bruni, blink-revie...@chromium.org, blink-...@chromium.org, Yuki Shiino, Kentaro Hara, chromium...@chromium.org

    Chromium LUCI CQ submitted this change.

    View Change



    5 is the latest approved patch-set.
    No files were changed between the latest approved patch-set and the submitted one.

    Approvals: Yuki Shiino: Looks good to me Kentaro Hara: Looks good to me Camillo Bruni: Commit
    [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.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ia406cc7d62e0908d2d83ee88df2a7f5912a54119
    Gerrit-Change-Number: 3243947
    Gerrit-PatchSet: 8
    Gerrit-Owner: Camillo Bruni <cbr...@chromium.org>
    Gerrit-Reviewer: Camillo Bruni <cbr...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
    Gerrit-Reviewer: Yuki Shiino <yukis...@chromium.org>
    Gerrit-MessageType: merged
    Allen antworten
    Antwort an Autor
    Weiterleiten
    0 neue Nachrichten