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

Unified Diff: Source/core/scripts/make_dom_exceptions.py

Issue 17271002: Clean up *.in files related to DOM exceptions and events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix order in EventTargetFactory.in Created 7 years, 6 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 | « Source/core/dom/EventTargetFactory.in ('k') | Source/core/scripts/make_event_factory.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/scripts/make_dom_exceptions.py
diff --git a/Source/core/scripts/make_dom_exceptions.py b/Source/core/scripts/make_dom_exceptions.py
index d2bb77d5bd1f1903a872c732d2b4a05296d19ba9..28609d74769bbf4496cdec1e54d1adb99519cc71 100755
--- a/Source/core/scripts/make_dom_exceptions.py
+++ b/Source/core/scripts/make_dom_exceptions.py
@@ -115,8 +115,7 @@ ExceptionCodeDescription::ExceptionCodeDescription(ExceptionCode ec)
class ExceptionCodeDescriptionWriter(name_macros.Writer):
defaults = {
- 'JSInterfaceName': None,
- 'interfaceName': None,
+ 'implementedAs': None,
'conditional': None,
}
default_parameters = {
@@ -132,8 +131,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 % {
@@ -143,13 +141,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 | « Source/core/dom/EventTargetFactory.in ('k') | Source/core/scripts/make_event_factory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698