[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
levin at chromium.org
levin at chromium.org
Wed Dec 22 15:50:19 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit f99ecce31f184a69a0620b78eaccd50aa3c87ebc
Author: levin at chromium.org <levin at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Nov 14 04:55:28 2010 +0000
2010-11-13 David Levin <levin at chromium.org>
Reviewed by Eric Seidel.
check-webkit-style function detection crashes on functions in templates.
https://bugs.webkit.org/show_bug.cgi?id=49504
For example "template <bool shouldClose(const Element*)>".
* Scripts/webkitpy/style/checkers/cpp.py: If not function is detected, bail out.
* Scripts/webkitpy/style/checkers/cpp_unittest.py: Modified the complex
function detection test to expose this issue.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index bc707a6..288a94e 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-13 David Levin <levin at chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ check-webkit-style function detection crashes on functions in templates.
+ https://bugs.webkit.org/show_bug.cgi?id=49504
+
+ For example "template <bool shouldClose(const Element*)>".
+
+ * Scripts/webkitpy/style/checkers/cpp.py: If not function is detected, bail out.
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py: Modified the complex
+ function detection test to expose this issue.
+
2010-11-12 David Levin <levin at chromium.org>
Reviewed by Shinichiro Hamaji.
diff --git a/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py b/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py
index 4f7c4ec..04573bd 100644
--- a/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py
+++ b/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py
@@ -1195,6 +1195,8 @@ def check_for_function_lengths(clean_lines, line_number, function_state, error):
# while keeping the column numbers of other characters the same as "line".
line_with_no_templates = iteratively_replace_matches_with_char(r'<[^<>]*>', '_', line)
match_function = search(r'((\w|:|<|>|,|~)*)\(', line_with_no_templates)
+ if not match_function:
+ return # The '(' must have been inside of a template.
# Use the column numbers from the modified line to find the
# function name in the original line.
diff --git a/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py b/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py
index bb4f351..9ba04a0 100644
--- a/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py
@@ -2463,7 +2463,7 @@ class CheckForFunctionLengthsTest(CppStyleTestBase):
error_lines = self.trigger_lines(error_level) + 1
trigger_level = self.trigger_lines(self.min_confidence)
self.assert_function_lengths_check(
- ('my_namespace::my_other_namespace::MyVeryLongTypeName<Type1, Type2>*\n'
+ ('my_namespace::my_other_namespace::MyVeryLongTypeName<Type1, bool func(const Element*)>*\n'
'my_namespace::my_other_namespace<Type3, Type4>::~MyFunction<Type5<Type6, Type7> >(int arg1, char* arg2)'
+ self.function_body(error_lines)),
('Small and focused functions are preferred: '
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list