diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-02 06:41:22 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-02 06:41:22 +0000 |
commit | e87bdbbbe4be0a1459300cace2d2232d34c8d7bd (patch) | |
tree | 1306de450a434c8737513afaf7697b2acfdcfa65 /content/browser | |
parent | d9a7c6b63aaa1cc681c0f0cf523d5428faefbae1 (diff) | |
download | chromium_src-e87bdbbbe4be0a1459300cace2d2232d34c8d7bd.zip chromium_src-e87bdbbbe4be0a1459300cace2d2232d34c8d7bd.tar.gz chromium_src-e87bdbbbe4be0a1459300cace2d2232d34c8d7bd.tar.bz2 |
Collect more data to send in crash reports for a crasher that's stumping me.
BUG=302530
R=brettw@chromium.org
Review URL: https://codereview.chromium.org/25555006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226398 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r-- | content/browser/plugin_process_host.cc | 20 | ||||
-rw-r--r-- | content/browser/plugin_process_host.h | 3 |
2 files changed, 23 insertions, 0 deletions
diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc index e22b32f..f71fa73 100644 --- a/content/browser/plugin_process_host.cc +++ b/content/browser/plugin_process_host.cc @@ -19,6 +19,7 @@ #include "base/logging.h" #include "base/metrics/histogram.h" #include "base/path_service.h" +#include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "content/browser/browser_child_process_host_impl.h" @@ -412,12 +413,31 @@ void PluginProcessHost::OnChannelCreated( void PluginProcessHost::OnChannelDestroyed(int renderer_id) { resource_context_map_.erase(renderer_id); + removed_pids_.insert(renderer_id); } void PluginProcessHost::GetContexts(const ResourceHostMsg_Request& request, ResourceContext** resource_context, net::URLRequestContext** request_context) { *resource_context = resource_context_map_[request.origin_pid]; + if (!*resource_context) { + std::string url = request.first_party_for_cookies.spec(); + // Debugging http://crbug.com/302530 + url += std::string("_") + base::IntToString(request.origin_pid); + + for (std::map<int, ResourceContext*>::iterator i = + resource_context_map_.begin(); + i != resource_context_map_.end(); ++i) { + url += std::string("_") + base::IntToString(i->first); + } + + url += "_"; + for (std::set<int>::iterator i = removed_pids_.begin(); + i != removed_pids_.end(); ++i) { + url += std::string("_") + base::IntToString(*i); + } + GetContentClient()->SetActiveURL(GURL(url)); + } *request_context = (*resource_context)->GetRequestContext(); } diff --git a/content/browser/plugin_process_host.h b/content/browser/plugin_process_host.h index 0b60062..e58c8d2 100644 --- a/content/browser/plugin_process_host.h +++ b/content/browser/plugin_process_host.h @@ -186,6 +186,9 @@ class CONTENT_EXPORT PluginProcessHost : public BrowserChildProcessHostDelegate, typedef std::map<int, ResourceContext*> ResourceContextMap; ResourceContextMap resource_context_map_; + // Debugging http://crbug.com/302530 + std::set<int> removed_pids_; + scoped_ptr<BrowserChildProcessHostImpl> process_; DISALLOW_COPY_AND_ASSIGN(PluginProcessHost); |