Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: xpcom/threads/ThreadStackHelper.cpp

Issue 29334661: Issue 3406 - [Adblock Browser for Android] Crash after updating to Android 6.0.1 (Closed)
Patch Set: Only removing native stack frame code now Created Jan. 27, 2016, 10:23 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « widget/android/AndroidBridge.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xpcom/threads/ThreadStackHelper.cpp
diff --git a/xpcom/threads/ThreadStackHelper.cpp b/xpcom/threads/ThreadStackHelper.cpp
index 6ae530d972ffb8bbe7815761739745398d84b4de..4593b59c898b50449380458213095e3d82e752bb 100644
--- a/xpcom/threads/ThreadStackHelper.cpp
+++ b/xpcom/threads/ThreadStackHelper.cpp
@@ -417,63 +417,6 @@ ThreadStackHelper::GetNativeStack(Stack& aStack)
GetStack(aStack);
NS_ENSURE_TRUE_VOID(context.mValid);
- CodeModulesProvider modulesProvider;
- google_breakpad::BasicCodeModules modules(&modulesProvider);
- google_breakpad::BasicSourceLineResolver resolver;
- google_breakpad::StackFrameSymbolizer symbolizer(nullptr, &resolver);
-
-#if defined(MOZ_THREADSTACKHELPER_X86)
- google_breakpad::StackwalkerX86 stackWalker(
- nullptr, &context.mContext, &context, &modules, &symbolizer);
-#elif defined(MOZ_THREADSTACKHELPER_X64)
- google_breakpad::StackwalkerAMD64 stackWalker(
- nullptr, &context.mContext, &context, &modules, &symbolizer);
-#elif defined(MOZ_THREADSTACKHELPER_ARM)
- google_breakpad::StackwalkerARM stackWalker(
- nullptr, &context.mContext, -1, &context, &modules, &symbolizer);
-#else
- #error "Unsupported architecture"
-#endif
-
- google_breakpad::CallStack callStack;
- std::vector<const google_breakpad::CodeModule*> modules_without_symbols;
-
- google_breakpad::Stackwalker::set_max_frames(ThreadContext::kMaxStackFrames);
- google_breakpad::Stackwalker::
- set_max_frames_scanned(ThreadContext::kMaxStackFrames);
-
- NS_ENSURE_TRUE_VOID(stackWalker.Walk(&callStack, &modules_without_symbols));
-
- const std::vector<google_breakpad::StackFrame*>& frames(*callStack.frames());
- for (intptr_t i = frames.size() - 1; i >= 0; i--) {
- const google_breakpad::StackFrame& frame = *frames[i];
- if (!frame.module) {
- continue;
- }
- const string& module = frame.module->code_file();
-#if defined(XP_LINUX) || defined(XP_MACOSX)
- const char PATH_SEP = '/';
-#elif defined(XP_WIN)
- const char PATH_SEP = '\\';
-#endif
- const char* const module_basename = strrchr(module.c_str(), PATH_SEP);
- const char* const module_name = module_basename ?
- module_basename + 1 : module.c_str();
-
- char buffer[0x100];
- size_t len = 0;
- if (!frame.function_name.empty()) {
- len = PR_snprintf(buffer, sizeof(buffer), "%s:%s",
- module_name, frame.function_name.c_str());
- } else {
- len = PR_snprintf(buffer, sizeof(buffer), "%s:0x%p",
- module_name, (intptr_t)
- (frame.instruction - frame.module->base_address()));
- }
- if (len) {
- aStack.AppendViaBuffer(buffer, len);
- }
- }
#endif // MOZ_THREADSTACKHELPER_NATIVE
}
« no previous file with comments | « widget/android/AndroidBridge.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld