Bug 703878: Fix potential race condition in header.py. r=khuey
authorJoerg Sonnenberger <joerg@britannica.bec.de>
Thu, 22 Dec 2011 18:38:27 -0500
changeset 83270 2a1f2758ad0d92bb355e29c75b8d9f63ea9df509
parent 83269 0d2cb76241525692b62f6b012adb4cd58c511f35
child 83271 ede336ccaed043083642e1490a31b4b6e1ff5569
child 83294 3d0cf1dd0a5abeee38844fab56b8bea2946b2f32
push id21744
push userbmo@edmorley.co.uk
push dateFri, 23 Dec 2011 23:56:40 +0000
treeherdermozilla-central@ede336ccaed0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs703878
milestone12.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 703878: Fix potential race condition in header.py. r=khuey
xpcom/idl-parser/header.py
--- a/xpcom/idl-parser/header.py
+++ b/xpcom/idl-parser/header.py
@@ -522,12 +522,18 @@ if __name__ == '__main__':
     idl = p.parse(open(file).read(), filename=file)
     idl.resolve(options.incdirs, p)
     print_header(idl, outfd, file)
 
     if closeoutfd:
         outfd.close()
 
     if options.depfile is not None:
+        dirname = os.path.dirname(options.depfile)
+        if dirname:
+            try:
+                os.makedirs(dirname)
+            except:
+                pass
         depfd = open(options.depfile, 'w')
         deps = [dep.replace('\\', '/') for dep in idl.deps]
 
         print >>depfd, "%s: %s" % (options.outfile, " ".join(deps))