Bug 675627: Fix unrecognized directive error in nsIURIRefObject.idl and make this error fatal in the future. r=bsmedberg
authorKyle Huey <khuey@kylehuey.com>
Mon, 01 Aug 2011 14:26:13 -0400
changeset 74448 fa54a739294bf6ae1df98ec15a1308d77ecafc2d
parent 74447 94aa13f4a1a6a63e95640a7551be992b59d80457
child 74449 bd93ca20e1fd1cf2a98cabe1be1897e83a099f15
push id235
push userbzbarsky@mozilla.com
push dateTue, 27 Sep 2011 17:13:04 +0000
treeherdermozilla-beta@2d1e082d176a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs675627
milestone8.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 675627: Fix unrecognized directive error in nsIURIRefObject.idl and make this error fatal in the future. r=bsmedberg
editor/idl/nsIURIRefObject.idl
xpcom/idl-parser/xpidl.py
--- a/editor/idl/nsIURIRefObject.idl
+++ b/editor/idl/nsIURIRefObject.idl
@@ -30,19 +30,16 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#ifndef nsIURIRefObject_h__
-#define nsIURIRefObject_h__
-
 #include "nsISupports.idl"
 #include "domstubs.idl"
 
 interface nsIDOMNode;
 
 /** A class which can represent any node which points to an
   * external URI, e.g. <a>, <img>, <script> etc,
   * and has the capability to rewrite URLs to be
@@ -71,11 +68,8 @@ interface nsIURIRefObject  : nsISupports
    *
    * @param aOldPat  Old pattern to be replaced, e.g. file:///a/b/
    * @param aNewPat  New pattern to be replaced, e.g. http://mypage.aol.com/
    * @param aMakeRel Rewrite links as relative vs. absolute
    */
   void RewriteAllURIs(in DOMString aOldPat, in DOMString aNewPat,
                       in boolean aMakeRel);
 };
-
-#endif /* nsIURIRefObject_h__ */
-
--- a/xpcom/idl-parser/xpidl.py
+++ b/xpcom/idl-parser/xpidl.py
@@ -989,20 +989,19 @@ class IDLParser(object):
     def t_INCLUDE(self, t):
         r'\#include[ \t]+"[^"\n]+"'
         inc, value, end = t.value.split('"')
         t.value = value
         return t
 
     def t_directive(self, t):
         r'\#(?P<directive>[a-zA-Z]+)[^\n]+'
-        print >>sys.stderr, IDLError("Unrecognized directive %s" % t.lexer.lexmatch.group('directive'),
-                                     Location(lexer=self.lexer,
-                                              lineno=self.lexer.lineno,
-                                              lexpos=self.lexer.lexpos))
+        raise IDLError("Unrecognized directive %s" % t.lexer.lexmatch.group('directive'),
+                       Location(lexer=self.lexer, lineno=self.lexer.lineno,
+                                lexpos=self.lexer.lexpos))
 
     def t_newline(self, t):
         r'\n+'
         t.lexer.lineno += len(t.value)
 
     def t_nativeid_NATIVEID(self, t):
         r'[^()\n]+(?=\))'
         t.lexer.begin('INITIAL')