Commit 530acee5 authored by Rayan Kanso's avatar Rayan Kanso Committed by Commit Bot

Fix bug in IDL compiler

I was getting build errors when using ImplementedAs on a dictionary and
referencing it from another dictionary idl file.

The file referencing the ImplementedAs dictionary wasn't using the
ImplementedAs value.

Bug: 839782
Change-Id: I3c3f91cecf9d6be0b33a7d990a32aabe2a48eefc
Reviewed-on: https://chromium-review.googlesource.com/1042710
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556030}
parent a9a75e8a
......@@ -268,8 +268,8 @@ def cpp_type(idl_type, extended_attributes=None, raw_type=False, used_as_rvalue_
return cpp_template_type('Member', implemented_as_class)
if idl_type.is_dictionary:
if used_as_rvalue_type:
return 'const %s&' % base_idl_type
return base_idl_type
return 'const %s&' % idl_type.implemented_as
return idl_type.implemented_as
if idl_type.is_union_type:
# Avoid "AOrNullOrB" for cpp type of (A? or B) because we generate
# V8AOrBOrNull to handle nulle for (A? or B), (A or B?) and (A or B)?
......
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