Commit 2a0c0690 authored by Yuki Shiino's avatar Yuki Shiino Committed by Chromium LUCI CQ

bind-gen: Clean up make_steps_of_ce_reactions

Cleans up make_steps_of_ce_reactions after
https://crrev.com/c/2586019

Change-Id: I1429f49bdedaad27b9aa1c9a2d49528dc2bb1a29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2592238Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837609}
parent a3aab48e
...@@ -1443,24 +1443,18 @@ def make_steps_of_ce_reactions(cg_context): ...@@ -1443,24 +1443,18 @@ def make_steps_of_ce_reactions(cg_context):
or cg_context.named_property_setter or cg_context.named_property_setter
or cg_context.named_property_deleter) or cg_context.named_property_deleter)
T = TextNode if "CEReactions" not in cg_context.member_like.extended_attributes:
return None
nodes = []
ext_attrs = cg_context.member_like.extended_attributes
if "Reflect" in ext_attrs:
nodes.append(T("// [Reflect]"))
if "CEReactions" in ext_attrs: nodes = [
nodes.append(T("// [CEReactions]")) TextNode("// [CEReactions]"),
nodes.append(T("CEReactionsScope ce_reactions_scope;")) TextNode("CEReactionsScope ce_reactions_scope;"),
nodes[-1].accumulate( ]
CodeGenAccumulator.require_include_headers([
"third_party/blink/renderer/core/html/custom/ce_reactions_scope.h"
]))
if not nodes: nodes[-1].accumulate(
return None CodeGenAccumulator.require_include_headers([
"third_party/blink/renderer/core/html/custom/ce_reactions_scope.h"
]))
# CEReactions scope is not tolerant of V8 exception, so it's necessary to # CEReactions scope is not tolerant of V8 exception, so it's necessary to
# invoke custom element reactions before throwing an exception. Thus, put # invoke custom element reactions before throwing an exception. Thus, put
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment