Commit 661c671c authored by Hitoshi Yoshida's avatar Hitoshi Yoshida Committed by Commit Bot

CodeGen: Create a default dictionary with an isolate by default

In the new code generator, dictionaries are expected to be created
with an isolate by default.
This CL makes the default value construction follow it.


Bug: 839389
Change-Id: I648304cf8df3e79ee3d2cdcb7b8b392bcc28f239
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332025Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#794136}
parent 9146c72c
......@@ -405,9 +405,11 @@ def make_default_value_expr(idl_type, default_value):
assignment_value = "{}()".format(type_info.value_t)
elif default_value.idl_type.is_object:
dict_name = blink_class_name(idl_type.unwrap().type_definition_object)
value = _format("{}::Create()", dict_name)
value = _format("{}::Create(${isolate})", dict_name)
initializer_expr = value
initializer_deps = ["isolate"]
assignment_value = value
assignment_deps = ["isolate"]
elif default_value.idl_type.is_boolean:
value = "true" if default_value.value else "false"
initializer_expr = value
......
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