Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Unified Diff: Source/bindings/scripts/interface_dependency_resolver.py

Issue 1057443002: Partial interface should use original interface's cpp_name. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/interface_dependency_resolver.py
diff --git a/Source/bindings/scripts/interface_dependency_resolver.py b/Source/bindings/scripts/interface_dependency_resolver.py
index f755d878ae24d6bf1de1b00a1751673e7fd550b1..837f7ee27808d8b523f42014ee1a8169fd042868 100644
--- a/Source/bindings/scripts/interface_dependency_resolver.py
+++ b/Source/bindings/scripts/interface_dependency_resolver.py
@@ -185,11 +185,31 @@ def merge_interface_dependencies(definitions, component, target_interface, depen
component))
if dependency_component in resolved_definitions:
+ # When merging a new partial interfaces, should not overwrite
+ # ImpelemntedAs extended attributes in merged partial
+ # interface.
+ # See also the below "if 'ImplementedAs' not in ... " line's
+ # comment.
+ dependency_interface.extended_attributes.pop('ImplementedAs', None)
resolved_definitions[dependency_component].update(dependency_definitions)
continue
dependency_interface.extended_attributes.update(target_interface.extended_attributes)
assert target_interface == definitions.interfaces[dependency_interface.name]
+ # A partial interface should use its original interface's
+ # ImplementedAs. If the original interface doesn't have,
+ # remove ImplementedAs defined in the partial interface.
+ # Because partial interface needs the original interface's
+ # cpp class to obtain partial interface's cpp class.
+ # e.g.. V8WindowPartial.cpp:
+ # DOMWindow* impl = V8Window::toImpl(holder);
+ # RawPtr<...> cppValue(DOMWindowQuota::webkitStorageInfo(impl));
+ # TODO(tasak): remove ImplementedAs extended attributes
+ # from all partial interfaces. Instead, rename all cpp/header
+ # files correctly. ImplementedAs should not be allowed in
+ # partial interfaces.
+ if 'ImplementedAs' not in target_interface.extended_attributes:
+ dependency_interface.extended_attributes.pop('ImplementedAs', None)
dependency_interface.original_interface = target_interface
target_interface.partial_interfaces.append(dependency_interface)
resolved_definitions[dependency_component] = dependency_definitions
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698