Commit 75fbfcdf authored by Yuki Shiino's avatar Yuki Shiino Committed by Commit Bot

bind-gen: Prioritize the receiver check in the new IDL interfaces

Prioritizes the receiver check in the new IDL interface
implementation over [Measure], etc.

Bug: 839389
Change-Id: Ib799685540fb4f4cad837c94648a45c278c6bcbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2305815
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790751}
parent 56e690a7
...@@ -1682,6 +1682,8 @@ def make_attribute_get_callback_def(cg_context, function_name): ...@@ -1682,6 +1682,8 @@ def make_attribute_get_callback_def(cg_context, function_name):
body = func_def.body body = func_def.body
body.extend([ body.extend([
make_check_receiver(cg_context),
EmptyNode(),
make_runtime_call_timer_scope(cg_context), make_runtime_call_timer_scope(cg_context),
make_bindings_trace_event(cg_context), make_bindings_trace_event(cg_context),
make_report_coop_access(cg_context), make_report_coop_access(cg_context),
...@@ -1699,7 +1701,6 @@ def make_attribute_get_callback_def(cg_context, function_name): ...@@ -1699,7 +1701,6 @@ def make_attribute_get_callback_def(cg_context, function_name):
return func_def return func_def
body.extend([ body.extend([
make_check_receiver(cg_context),
make_return_value_cache_return_early(cg_context), make_return_value_cache_return_early(cg_context),
EmptyNode(), EmptyNode(),
make_check_security_of_return_value(cg_context), make_check_security_of_return_value(cg_context),
...@@ -1729,6 +1730,8 @@ def make_attribute_set_callback_def(cg_context, function_name): ...@@ -1729,6 +1730,8 @@ def make_attribute_set_callback_def(cg_context, function_name):
return func_def return func_def
body.extend([ body.extend([
make_check_receiver(cg_context),
EmptyNode(),
make_runtime_call_timer_scope(cg_context), make_runtime_call_timer_scope(cg_context),
make_bindings_trace_event(cg_context), make_bindings_trace_event(cg_context),
make_report_deprecate_as(cg_context), make_report_deprecate_as(cg_context),
...@@ -1754,8 +1757,6 @@ def make_attribute_set_callback_def(cg_context, function_name): ...@@ -1754,8 +1757,6 @@ def make_attribute_set_callback_def(cg_context, function_name):
"EventHandler", "OnBeforeUnloadEventHandler", "EventHandler", "OnBeforeUnloadEventHandler",
"OnErrorEventHandler"))): "OnErrorEventHandler"))):
body.extend([ body.extend([
make_check_receiver(cg_context),
EmptyNode(),
TextNode("""\ TextNode("""\
EventListener* event_handler = JSEventHandler::CreateOrNull( EventListener* event_handler = JSEventHandler::CreateOrNull(
${v8_property_value}, ${v8_property_value},
...@@ -1833,7 +1834,6 @@ EventListener* event_handler = JSEventHandler::CreateOrNull( ...@@ -1833,7 +1834,6 @@ EventListener* event_handler = JSEventHandler::CreateOrNull(
return func_def return func_def
body.extend([ body.extend([
make_check_receiver(cg_context),
make_check_argument_length(cg_context), make_check_argument_length(cg_context),
EmptyNode(), EmptyNode(),
]) ])
...@@ -2120,6 +2120,8 @@ def make_operation_function_def(cg_context, function_name): ...@@ -2120,6 +2120,8 @@ def make_operation_function_def(cg_context, function_name):
body.append(EmptyNode()) body.append(EmptyNode())
body.extend([ body.extend([
make_check_receiver(cg_context),
EmptyNode(),
make_report_coop_access(cg_context), make_report_coop_access(cg_context),
make_report_deprecate_as(cg_context), make_report_deprecate_as(cg_context),
make_report_measure_as(cg_context), make_report_measure_as(cg_context),
...@@ -2134,7 +2136,6 @@ def make_operation_function_def(cg_context, function_name): ...@@ -2134,7 +2136,6 @@ def make_operation_function_def(cg_context, function_name):
return func_def return func_def
body.extend([ body.extend([
make_check_receiver(cg_context),
make_check_argument_length(cg_context), make_check_argument_length(cg_context),
EmptyNode(), EmptyNode(),
make_steps_of_ce_reactions(cg_context), make_steps_of_ce_reactions(cg_context),
......
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