| Index: core/scripts/make_dom_exceptions.py
|
| diff --git a/core/scripts/make_dom_exceptions.py b/core/scripts/make_dom_exceptions.py
|
| index 540ac3df84118984afd615335243f61b623fe6e4..f0c7dde608b4357d26b945088b6a0bba6ba40128 100755
|
| --- a/core/scripts/make_dom_exceptions.py
|
| +++ b/core/scripts/make_dom_exceptions.py
|
| @@ -52,10 +52,6 @@ enum ExceptionType {
|
| struct ExceptionCodeDescription {
|
| explicit ExceptionCodeDescription(ExceptionCode);
|
|
|
| - // |typeName| has spaces and is suitable for use in exception
|
| - // description strings; maximum length is 10 characters.
|
| - const char* typeName;
|
| -
|
| // |name| is the exception name, also intended for use in exception
|
| // description strings; 0 if name not known; maximum length is 27
|
| // characters.
|
| @@ -115,7 +111,7 @@ ExceptionCodeDescription::ExceptionCodeDescription(ExceptionCode ec)
|
|
|
| class ExceptionCodeDescriptionWriter(name_macros.Writer):
|
| defaults = {
|
| - 'interfaceName': None,
|
| + 'implementedAs': None,
|
| 'conditional': None,
|
| }
|
| default_parameters = {
|
| @@ -131,8 +127,7 @@ class ExceptionCodeDescriptionWriter(name_macros.Writer):
|
| return self.in_file.name_dictionaries
|
|
|
| def _exception_type(self, exception):
|
| - name = os.path.basename(exception['name'])
|
| - return self.wrap_with_condition(' ' + name + 'Type,', exception['conditional'])
|
| + return self.wrap_with_condition(' ' + self._class_name_for_entry(exception) + 'Type,', exception['conditional'])
|
|
|
| def generate_header(self):
|
| return HEADER_TEMPLATE % {
|
| @@ -142,13 +137,13 @@ class ExceptionCodeDescriptionWriter(name_macros.Writer):
|
| }
|
|
|
| def _include(self, exception):
|
| - include = '#include "' + exception['name'] + '.h"'
|
| + include = '#include "' + self._headers_header_include_path(exception) + '"'
|
| return self.wrap_with_condition(include, exception['conditional'])
|
|
|
| def _description_initalization(self, exception):
|
| name = os.path.basename(exception['name'])
|
| - if name == 'DOMCoreException':
|
| - return '' # DOMCoreException needs to be last because it's a catch-all.
|
| + if name == 'DOMException':
|
| + return '' # DOMException needs to be last because it's a catch-all.
|
| description_initalization = """ if (%(name)s::initializeDescription(ec, this))
|
| return;""" % {'name': name}
|
| return self.wrap_with_condition(description_initalization, exception['conditional'])
|
|
|