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

Unified Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 2800005: Allow POST requests made from an extension process to reuse the same process, (Closed)
Patch Set: . Created 10 years, 6 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 | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/browser_render_process_host.cc
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index d6fb8131875e933166e104406c72f586ed94d88e..887c04a031a62c6e4efc065980f08e516dcc45c6 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -251,16 +251,12 @@ bool BrowserRenderProcessHost::Init(bool is_extensions_process,
URLRequestContextGetter* request_context) {
// calling Init() more than once does nothing, this makes it more convenient
// for the view host which may not be sure in some cases
- if (channel_.get()) {
- // Ensure that |is_extensions_process| doesn't change across multiple calls
- // to Init().
- if (!run_renderer_in_process()) {
- DCHECK_EQ(extension_process_, is_extensions_process);
- }
+ if (channel_.get())
return true;
- }
- extension_process_ = is_extensions_process;
+ // It is possible for an extension process to be reused for non-extension
+ // content, e.g. if an extension calls window.open.
+ extension_process_ = extension_process_ || is_extensions_process;
// run the IPC channel on the shared IO thread.
base::Thread* io_thread = g_browser_process->io_thread();
« no previous file with comments | « no previous file | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698