Restrict ownership of symbol data buffers to symbol supplier.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@721 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
SiyangXie@gmail.com 2010-11-01 17:31:31 +00:00
parent eabfff133d
commit a8c1c466a1
18 changed files with 200 additions and 126 deletions

View file

@ -54,26 +54,8 @@ namespace google_breakpad {
FastSourceLineResolver::FastSourceLineResolver()
: SourceLineResolverBase(new FastModuleFactory) { }
void FastSourceLineResolver::ClearLocalMemory() {
for (MemoryMap::iterator it = memory_chunks_.begin();
it != memory_chunks_.end();
++it) {
delete it->second;
}
}
void FastSourceLineResolver::DeleteDataUnload(const CodeModule *module) {
if (module) {
MemoryMap::iterator iter = memory_chunks_.find(module->code_file());
if (iter != memory_chunks_.end()) {
delete iter->second;
}
}
}
void FastSourceLineResolver::StoreDataBeforeLoad(const CodeModule *module,
char *symbol_data) {
memory_chunks_.insert(make_pair(module->code_file(), symbol_data));
bool FastSourceLineResolver::ShouldDeleteMemoryBufferAfterLoadModule() {
return false;
}
void FastSourceLineResolver::Module::LookupAddress(StackFrame *frame) const {