Title: [158863] trunk/Source/WebKit2
Revision
158863
Author
[email protected]
Date
2013-11-07 12:19:13 -0800 (Thu, 07 Nov 2013)

Log Message

Report error on unknown template class usage.
https://bugs.webkit.org/show_bug.cgi?id=123096

Patch by Tamas Gergely <[email protected]> on 2013-11-07
Reviewed by Darin Adler.

Report error when template class is not found in the dictionary.

* Scripts/webkit2/messages.py:
(class_template_headers):
(class_template_headers.template):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (158862 => 158863)


--- trunk/Source/WebKit2/ChangeLog	2013-11-07 20:17:13 UTC (rev 158862)
+++ trunk/Source/WebKit2/ChangeLog	2013-11-07 20:19:13 UTC (rev 158863)
@@ -1,3 +1,16 @@
+2013-11-07  Tamas Gergely  <[email protected]>
+
+        Report error on unknown template class usage.
+        https://bugs.webkit.org/show_bug.cgi?id=123096
+
+        Reviewed by Darin Adler.
+
+        Report error when template class is not found in the dictionary.
+
+        * Scripts/webkit2/messages.py:
+        (class_template_headers):
+        (class_template_headers.template):
+
 2013-11-07  Denis Nomiyama  <[email protected]>
 
         [GTK] Glyphs in vertical text tests are rotated 90 degrees clockwise

Modified: trunk/Source/WebKit2/Scripts/webkit2/messages.py (158862 => 158863)


--- trunk/Source/WebKit2/Scripts/webkit2/messages.py	2013-11-07 20:17:13 UTC (rev 158862)
+++ trunk/Source/WebKit2/Scripts/webkit2/messages.py	2013-11-07 20:19:13 UTC (rev 158863)
@@ -22,6 +22,7 @@
 
 import collections
 import re
+import sys
 from webkit2 import parser
 
 WANTS_CONNECTION_ATTRIBUTE = 'WantsConnection'
@@ -367,7 +368,13 @@
     match = re.match('(?P<template_name>.+?)<(?P<parameter_string>.+)>', template_string)
     if not match:
         return {'header_infos':[], 'types':[template_string]}
-    header_infos = [class_template_types[match.groupdict()['template_name']]]
+
+    template_name = match.groupdict()['template_name']
+    if template_name not in class_template_types:
+        sys.stderr.write("Error: no class template type is defined for '%s'\n" % (template_string))
+        sys.exit(1)
+
+    header_infos = [class_template_types[template_name]]
     types = []
 
     for parameter in parser.split_parameters_string(match.groupdict()['parameter_string']):
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to