Changeset 158863 in webkit


Ignore:
Timestamp:
Nov 7, 2013 12:19:13 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Tamas Gergely <gertom@inf.u-szeged.hu> 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):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r158848 r158863  
     12013-11-07  Tamas Gergely  <gertom@inf.u-szeged.hu>
     2
     3        Report error on unknown template class usage.
     4        https://bugs.webkit.org/show_bug.cgi?id=123096
     5
     6        Reviewed by Darin Adler.
     7
     8        Report error when template class is not found in the dictionary.
     9
     10        * Scripts/webkit2/messages.py:
     11        (class_template_headers):
     12        (class_template_headers.template):
     13
    1142013-11-07  Denis Nomiyama  <d.nomiyama@samsung.com>
    215
  • trunk/Source/WebKit2/Scripts/webkit2/messages.py

    r156420 r158863  
    2323import collections
    2424import re
     25import sys
    2526from webkit2 import parser
    2627
     
    368369    if not match:
    369370        return {'header_infos':[], 'types':[template_string]}
    370     header_infos = [class_template_types[match.groupdict()['template_name']]]
     371
     372    template_name = match.groupdict()['template_name']
     373    if template_name not in class_template_types:
     374        sys.stderr.write("Error: no class template type is defined for '%s'\n" % (template_string))
     375        sys.exit(1)
     376
     377    header_infos = [class_template_types[template_name]]
    371378    types = []
    372379
Note: See TracChangeset for help on using the changeset viewer.