diff --git a/src/objects.cc b/src/objects.cc index 731d602b47..392c158e15 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -9862,11 +9862,18 @@ bool JSFunction::PassesFilter(const char* raw_filter) { Vector 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; }