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

Unified Diff: content/browser/resource_context_impl.cc

Issue 9443033: Fail gracefully if InitializeResourceContext ends up calling itself recursively. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 10 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
« content/browser/browser_context.cc ('K') | « content/browser/browser_context.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/resource_context_impl.cc
diff --git a/content/browser/resource_context_impl.cc b/content/browser/resource_context_impl.cc
index 525a10a02774b80c684b099d456c8ab38ed599d9..361c229d95adc0539305ed18f1d93ba237662fc1 100644
--- a/content/browser/resource_context_impl.cc
+++ b/content/browser/resource_context_impl.cc
@@ -81,7 +81,10 @@ HostZoomMap* GetHostZoomMapForResourceContext(ResourceContext* context) {
void InitializeResourceContext(BrowserContext* browser_context) {
jam 2012/02/23 23:11:36 nit: perhaps rename this to EnsureResourceContextI
ResourceContext* resource_context = browser_context->GetResourceContext();
- DCHECK(!resource_context->GetUserData(kWebKitContextKeyName));
+
+ if (resource_context->GetUserData(kWebKitContextKeyName))
+ return;
+
resource_context->SetUserData(
kWebKitContextKeyName,
new UserDataAdapter<WebKitContext>(
« content/browser/browser_context.cc ('K') | « content/browser/browser_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698