Bug 766449. Use the fully namespaced class name to determine the default header name for bindings. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 22 Jun 2012 16:18:51 -0400
changeset 97441 13fd7bda630a23355ed04e73762bac0cc39fe670
parent 97440 01d6a8fd10ce15938bff80af001dac01a2ea1a5c
child 97442 6de95d6a72cf3b5e876149064108580f371dd2f9
push id11047
push userbzbarsky@mozilla.com
push dateFri, 22 Jun 2012 20:19:28 +0000
treeherdermozilla-inbound@13fd7bda630a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs766449
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 766449. Use the fully namespaced class name to determine the default header name for bindings. r=peterv
dom/bindings/Bindings.conf
dom/bindings/Configuration.py
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -171,16 +171,17 @@ DOMInterfaces = {
     'workers': True,
     'nativeType': 'JSObject',
     'headerFile': 'jsapi.h',
     'castable': False
 }],
 
 'WebGLRenderingContext': {
   'nativeType': 'mozilla::WebGLContext',
+  'headerFile': 'WebGLContext.h',
   'prefable': True,
   'resultNotAddRefed': [ 'canvas', 'getContextAttributes', 'getExtension',
                          'getAttachedShaders' ],
   'implicitJSContext': [ 'texImage2D', 'texSubImage2D' ],
   'infallible': [ 'canvas', 'drawingBufferWidth', 'drawingBufferHeight',
                   'isContextLost', 'getSupportedExtensions',
                   'getExtension', 'activeTexture',
                   'attachShader', 'bindAttribLocation', 'bindBuffer',
@@ -351,18 +352,17 @@ def addExternalIface(iface, nativeType=N
 def addExternalHTMLElement(element):
    nativeElement = 'ns' + element
    addExternalIface(element, nativeType=nativeElement,
                     headerFile=nativeElement + '.h')
 
 addExternalHTMLElement('HTMLCanvasElement')
 addExternalHTMLElement('HTMLImageElement')
 addExternalHTMLElement('HTMLVideoElement')
-addExternalIface('ImageData', nativeType='mozilla::dom::ImageData',
-                 headerFile='mozilla/dom/ImageData.h')
+addExternalIface('ImageData', nativeType='mozilla::dom::ImageData')
 addExternalIface('WebGLActiveInfo', nativeType='mozilla::WebGLActiveInfo',
                  headerFile='WebGLContext.h')
 addExternalIface('WebGLBuffer', nativeType='mozilla::WebGLBuffer',
                  headerFile='WebGLContext.h')
 addExternalIface('WebGLContextAttributes', nativeType='JSObject',
                  headerFile='jsapi.h')
 addExternalIface('WebGLExtension', nativeType='nsIWebGLExtension',
                  headerFile='WebGLContext.h')
--- a/dom/bindings/Configuration.py
+++ b/dom/bindings/Configuration.py
@@ -126,17 +126,17 @@ class Descriptor(DescriptorProvider):
         DescriptorProvider.__init__(self, config, desc.get('workers', False))
         self.interface = interface
 
         # Read the desc, and fill in the relevant defaults.
         self.nativeType = desc['nativeType']
         self.hasInstanceInterface = desc.get('hasInstanceInterface', None)
 
         headerDefault = self.nativeType
-        headerDefault = headerDefault.split("::")[-1] + ".h"
+        headerDefault = headerDefault.replace("::", "/") + ".h"
         self.headerFile = desc.get('headerFile', headerDefault)
 
         castableDefault = not self.interface.isCallback()
         self.castable = desc.get('castable', castableDefault)
 
         self.notflattened = desc.get('notflattened', False)
         self.register = desc.get('register', True)