Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1303)

Unified Diff: core/scripts/make_dom_exceptions.py

Issue 19605006: Roll IDL to multivm@1316 (Closed) Base URL: https://dart.googlecode.com/svn/third_party/WebCore
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/scripts/make_css_value_keywords.py ('k') | core/scripts/make_event_factory.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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'])
« no previous file with comments | « core/scripts/make_css_value_keywords.py ('k') | core/scripts/make_event_factory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698