Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 7e3a325a6df6c337b5a8b0fc604f8204ff09ce5e..94f4570f2e548505e9d3e4c3d15129660d5e3696 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -13140,43 +13140,6 @@ void JSFunction::PrintName(FILE* out) { |
} |
-// The filter is a pattern that matches function names in this way: |
-// "*" all; the default |
-// "-" all but the top-level function |
-// "-name" all but the function "name" |
-// "" only the top-level function |
-// "name" only the function "name" |
-// "name*" only functions starting with "name" |
-// "~" none; the tilde is not an identifier |
-bool JSFunction::PassesFilter(const char* raw_filter) { |
- if (*raw_filter == '*') return true; |
- String* name = shared()->DebugName(); |
- 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 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; |
- } |
- if (filter[filter.length() - 1] == '*' && |
- name->IsUtf8EqualTo(filter.SubVector(0, filter.length() - 1), true)) { |
- return true; |
- } |
- return false; |
-} |
- |
- |
Handle<String> JSFunction::GetName(Handle<JSFunction> function) { |
Isolate* isolate = function->GetIsolate(); |
Handle<Object> name = |
@@ -13542,6 +13505,41 @@ String* SharedFunctionInfo::DebugName() { |
return String::cast(n); |
} |
+// The filter is a pattern that matches function names in this way: |
+// "*" all; the default |
+// "-" all but the top-level function |
+// "-name" all but the function "name" |
+// "" only the top-level function |
+// "name" only the function "name" |
+// "name*" only functions starting with "name" |
+// "~" none; the tilde is not an identifier |
+bool SharedFunctionInfo::PassesFilter(const char* raw_filter) { |
+ if (*raw_filter == '*') return true; |
+ String* name = DebugName(); |
Michael Starzinger
2016/03/22 09:06:31
The only change inside the function was this one l
Jakob Kummerow
2016/03/22 09:32:11
Acknowledged.
|
+ 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 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; |
+ } |
+ if (filter[filter.length() - 1] == '*' && |
+ name->IsUtf8EqualTo(filter.SubVector(0, filter.length() - 1), true)) { |
+ return true; |
+ } |
+ return false; |
+} |
bool SharedFunctionInfo::HasSourceCode() const { |
return !script()->IsUndefined() && |