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

Unified Diff: chrome/browser/plugin_process_host.cc

Issue 171050: Fix for crash bug in PluginProcessHost::OnGetCookies - it likes like this can... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 4 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_process_host.cc
===================================================================
--- chrome/browser/plugin_process_host.cc (revision 23543)
+++ chrome/browser/plugin_process_host.cc (working copy)
@@ -25,6 +25,7 @@
#include "base/path_service.h"
#include "base/process_util.h"
#include "base/scoped_ptr.h"
+#include "base/string_util.h"
#include "base/thread.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/child_process_security_policy.h"
@@ -527,7 +528,12 @@
// Note: We don't have a first_party_for_cookies check because plugins bypass
// third-party cookie blocking.
- *cookies = context->cookie_store()->GetCookies(url);
+ if (context && context->cookie_store()) {
+ *cookies = context->cookie_store()->GetCookies(url);
jam 2009/08/17 18:05:41 the first check is not needed since it's already c
robertshield 2009/08/17 18:10:35 It appears that Profile::GetDefaultRequestContext(
jam 2009/08/17 18:19:08 ah, I didn't know that, sorry for the noise. lgtm
+ } else {
+ DLOG(ERROR) << "Could not serve plugin cookies request.";
+ *cookies = EmptyString();
+ }
}
void PluginProcessHost::OnAccessFiles(int process_id,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698