Index: chrome/browser/chrome_content_browser_client.cc |
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
index 5a898a9a27de3fdaa886864d8837ee019cecb781..0df97061750677d6dfca81f9937c4fc03b254a4d 100644 |
--- a/chrome/browser/chrome_content_browser_client.cc |
+++ b/chrome/browser/chrome_content_browser_client.cc |
@@ -450,15 +450,19 @@ bool ChromeContentBrowserClient::ShouldUseProcessPerSite( |
return false; |
// If the URL is part of a hosted app that does not have the background |
- // permission, we want to give each instance its own process to improve |
+ // permission, or that does not allow JavaScript access to the background |
+ // page, we want to give each instance its own process to improve |
// responsiveness. |
- if (extension->GetType() == Extension::TYPE_HOSTED_APP && |
- !extension->HasAPIPermission(ExtensionAPIPermission::kBackground)) |
- return false; |
+ if (extension->GetType() == Extension::TYPE_HOSTED_APP) { |
+ if (!extension->HasAPIPermission(ExtensionAPIPermission::kBackground) || |
+ !extension->allow_background_js_access()) { |
Charlie Reis
2012/02/29 02:56:32
Drew or Mihai, is there a way to enforce having no
Andrew T Wilson (Slow)
2012/02/29 03:20:15
I think returning false from CanCreateWindow() wil
Charlie Reis
2012/03/01 00:38:22
Yep, seems to work.
|
+ return false; |
+ } |
+ } |
- // Hosted apps that have the background permission must use process per site, |
- // since all instances can make synchronous calls to the background window. |
- // Other extensions should use process per site as well. |
+ // Hosted apps that have script access to their background page must use |
+ // process per site, since all instances can make synchronous calls to the |
+ // background window. Other extensions should use process per site as well. |
return true; |
} |