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

Unified Diff: src/objects.cc

Issue 145663008: Hydrogen filter now supports trailing wildcard in negative filter. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 731d602b47a80a8f074a6d02d6e08eb39b29d639..392c158e1526cb3211497ba1d2c143137db6d60d 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -9862,11 +9862,18 @@ bool JSFunction::PassesFilter(const char* raw_filter) {
Vector<const char> filter = CStrVector(raw_filter);
if (filter.length() == 0) return name->length() == 0;
if (filter[0] == '-') {
+ // Negative filter.
if (filter.length() == 1) {
return (name->length() != 0);
- } else if (!name->IsUtf8EqualTo(filter.SubVector(1, filter.length()))) {
- return true;
+ } else if (name->IsUtf8EqualTo(filter.SubVector(1, filter.length()))) {
+ return false;
+ }
+ if (filter[filter.length() - 1] == '*' &&
+ name->IsUtf8EqualTo(filter.SubVector(1, filter.length() - 1), true)) {
+ return false;
}
+ return true;
+
} else if (name->IsUtf8EqualTo(filter)) {
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698