Add _workers suffix to parent chain in JSClass.
authorBobby Holley <bobbyholley@gmail.com>
Fri, 27 Jan 2012 12:18:27 +0100
changeset 85157 b010910c1b7afb91c429ecd4499dc3c7f63255d6
parent 85156 fd3416b716f37f849188ceb77007c9b124807623
child 85158 7ed92841def7b73f5eb6f740327755269d5100e3
push id59
push userbobbyholley@gmail.com
push dateFri, 27 Jan 2012 11:18:47 +0000
milestone12.0a1
Add _workers suffix to parent chain in JSClass.
dom/bindings/Codegen.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -18,17 +18,18 @@ class CodegenThing():
         return "" # Override me!
 
 class DOMJSClass(CodegenThing):
     def __init__(self, implementation):
         CodegenThing.__init__(self, implementation)
     def declare(self):
         return "extern DOMJSClass Class;\n\n"
     def define(self):
-        interfaceChainString = ', '.join(['id::' + iface \
+        suffix = "_workers" if self.implementation.workers else ""
+        interfaceChainString = ', '.join(['id::' + iface + suffix \
                                           for iface in self.implementation.domClass.interfaceChain])
         return """DOMJSClass Class = {
   { "%s",
     JSCLASS_IS_DOMJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(1),
     JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_StrictPropertyStub,
     JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub,
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
   },