Revision: 18851
Author:   [email protected]
Date:     Mon Jan 27 12:05:47 2014 UTC
Log:      Hydrogen filter now supports trailing wildcard in negative filter.

[email protected]

Review URL: https://codereview.chromium.org/145663008
http://code.google.com/p/v8/source/detail?r=18851

Modified:
 /branches/bleeding_edge/src/objects.cc

=======================================
--- /branches/bleeding_edge/src/objects.cc      Fri Jan 24 16:01:15 2014 UTC
+++ /branches/bleeding_edge/src/objects.cc      Mon Jan 27 12:05:47 2014 UTC
@@ -9862,11 +9862,18 @@
   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;
   }

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to