Commit 1a861efd authored by Yuki Shiino's avatar Yuki Shiino Committed by Commit Bot

bind-gen: Update the argument for [StringContext]

It turned out that we need to respect the receiver object's
active document, thus we cannot use ${execution_context}.

This patch makes changes on the new bindings generator, which
is not yet shipped.  No prod change.

Bug: 839389
Change-Id: Ia8ce3c68a8dbdfc1aff791b89922782788b212ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2117559Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752810}
parent 603b16ff
...@@ -423,7 +423,8 @@ def make_v8_to_blink_value(blink_var_name, ...@@ -423,7 +423,8 @@ def make_v8_to_blink_value(blink_var_name,
"${exception_state}", "${exception_state}",
] ]
if "StringContext" in idl_type.effective_annotations: if "StringContext" in idl_type.effective_annotations:
arguments.append("${execution_context}") arguments.append(
"bindings::ExecutionContextFromV8Wrappable(${blink_receiver})")
blink_value_expr = _format( blink_value_expr = _format(
"NativeValueTraits<{_1}>::{_2}({_3})", "NativeValueTraits<{_1}>::{_2}({_3})",
_1=native_value_tag(idl_type), _1=native_value_tag(idl_type),
...@@ -490,7 +491,8 @@ def make_v8_to_blink_value_variadic(blink_var_name, v8_array, ...@@ -490,7 +491,8 @@ def make_v8_to_blink_value_variadic(blink_var_name, v8_array,
str(v8_array_start_index), "${exception_state}" str(v8_array_start_index), "${exception_state}"
] ]
if "StringContext" in idl_type.element_type.effective_annotations: if "StringContext" in idl_type.element_type.effective_annotations:
arguments.append("${execution_context}") arguments.append(
"bindings::ExecutionContextFromV8Wrappable(${blink_receiver})")
text = _format( text = _format(
pattern, pattern,
_1=blink_var_name, _1=blink_var_name,
......
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