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

Unified Diff: appengine/findit/crash/stacktrace_parser.py

Issue 2593383002: [Predator] Move ``FilterStackBuffer`` from stack parser to ``AddFilteredStack`` of stacktrace buffe… (Closed)
Patch Set: . Created 4 years 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
Index: appengine/findit/crash/stacktrace_parser.py
diff --git a/appengine/findit/crash/stacktrace_parser.py b/appengine/findit/crash/stacktrace_parser.py
index 0080ce5e774ecd3f55845b4ce08edb5341053b09..d9b7f4720243eb086097e04a76d0b4eaaa24c62b 100644
--- a/appengine/findit/crash/stacktrace_parser.py
+++ b/appengine/findit/crash/stacktrace_parser.py
@@ -10,34 +10,6 @@ from crash.stacktrace import Stacktrace
class StacktraceParser(object):
- @staticmethod
- def FilterStackBuffer(stack_buffer, filters):
- """Builds stack buffer to keep all the Callstack inforamtion and metadata.
-
- Filter stack buffers and cache all the metadata for later use in
- ``BuildStackTrace``.
-
- Args:
- stack_buffer (CallStackBuffer): callstack buffer to be filtered.
- filters (list): List of Filter objs, each Filter obj is callable and takes
- stack_buffer as the only parameter.
-
- Returns:
- A new ``CallStackBuffer`` instance, None when all the frames of the
- stack buffer are filtered.
- """
- # If the callstack is the initial one (infinte priority) or empty, return
- # None.
- if math.isinf(stack_buffer.priority) or not stack_buffer.frames:
- return None
-
- for stack_filter in filters:
- stack_buffer = stack_filter(stack_buffer)
- if not stack_buffer:
- return None
-
- return stack_buffer
-
def Parse(self, stacktrace_string, deps, signature=None, top_n_frames=None):
"""Parses stacktrace_string into ``Stacktrace`` instance.

Powered by Google App Engine
This is Rietveld 408576698