summaryrefslogtreecommitdiff
path: root/src/interface-map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface-map.c')
-rw-r--r--src/interface-map.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/interface-map.c b/src/interface-map.c
index 467c0ed..555156a 100644
--- a/src/interface-map.c
+++ b/src/interface-map.c
@@ -111,6 +111,7 @@ interface_topoligical_sort(struct interface_map_entry *srcinf, int infc)
dstinf[idx].node = srcinf[inf].node;
dstinf[idx].inherit_name = srcinf[inf].inherit_name;
dstinf[idx].noobject = srcinf[inf].noobject;
+ dstinf[idx].primary_global = srcinf[inf].primary_global;
dstinf[idx].operationc = srcinf[inf].operationc;
dstinf[idx].operationv = srcinf[inf].operationv;
dstinf[idx].attributec = srcinf[inf].attributec;
@@ -422,6 +423,7 @@ int interface_map_new(struct genbind_node *genbind,
NULL,
WEBIDL_NODE_TYPE_INTERFACE_INHERITANCE));
+ /* is the interface marked as not generating an object */
if (webidl_node_find_type_ident(
webidl_node_getnode(node),
WEBIDL_NODE_TYPE_EXTENDED_ATTRIBUTE,
@@ -433,6 +435,18 @@ int interface_map_new(struct genbind_node *genbind,
ecur->noobject = true;
}
+ /* is the interface marked as the primary global */
+ if (webidl_node_find_type_ident(
+ webidl_node_getnode(node),
+ WEBIDL_NODE_TYPE_EXTENDED_ATTRIBUTE,
+ "PrimaryGlobal") != NULL) {
+ /** \todo we should ensure nothing inherits *from* this
+ * class or all hell will break loose having two
+ * primary globals.
+ */
+ ecur->primary_global = true;
+ }
+
/* matching class from binding */
ecur->class = genbind_node_find_type_ident(genbind,
NULL, GENBIND_NODE_TYPE_CLASS, ecur->name);