зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1414245 - set sameProcessAsFrameLoader on extension sidebar and options_ui browsers, r=aswan
MozReview-Commit-ID: 2KsOE6RNq4P --HG-- extra : rebase_source : 7547cb04ce1874ef1dd63ec98d648c2b908c9087
This commit is contained in:
Родитель
81ca7c367c
Коммит
26218ef485
|
@ -40,8 +40,12 @@ function getBrowser(sidebar) {
|
|||
browser.setAttribute("selectmenulist", "ContentSelectDropdown");
|
||||
browser.setAttribute("onclick", "window.parent.contentAreaClick(event, true);");
|
||||
|
||||
// Ensure that the browser is going to run in the same process of the other
|
||||
// extension pages from the same addon.
|
||||
browser.sameProcessAsFrameLoader = sidebar.extension.groupFrameLoader;
|
||||
|
||||
let readyPromise;
|
||||
if (sidebar.remote) {
|
||||
if (sidebar.extension.remote) {
|
||||
browser.setAttribute("remote", "true");
|
||||
browser.setAttribute("remoteType",
|
||||
E10SUtils.getRemoteTypeForURI(sidebar.uri, true,
|
||||
|
@ -102,7 +106,7 @@ function loadPanel(extensionId, extensionUrl, browserStyle) {
|
|||
let policy = WebExtensionPolicy.getByID(extensionId);
|
||||
let sidebar = {
|
||||
uri: extensionUrl,
|
||||
remote: policy.extension.remote,
|
||||
extension: policy.extension,
|
||||
browserStyle,
|
||||
};
|
||||
getBrowser(sidebar).then(browser => {
|
||||
|
|
|
@ -3188,6 +3188,10 @@ var gDetailView = {
|
|||
});
|
||||
|
||||
let {optionsURL, optionsBrowserStyle} = this._addon;
|
||||
if (this._addon.isWebExtension) {
|
||||
let policy = ExtensionParent.WebExtensionPolicy.getByID(this._addon.id);
|
||||
browser.sameProcessAsFrameLoader = policy.extension.groupFrameLoader;
|
||||
}
|
||||
let remote = !E10SUtils.canLoadURIInProcess(optionsURL, Services.appinfo.PROCESS_TYPE_DEFAULT);
|
||||
|
||||
let readyPromise;
|
||||
|
|
Загрузка…
Ссылка в новой задаче