Bug 1293126 - Remove Schemas.load from content's ExtensionContext
MozReview-Commit-ID: JOToEC2Aokp
--- a/toolkit/components/extensions/ExtensionContent.jsm
+++ b/toolkit/components/extensions/ExtensionContent.jsm
@@ -410,31 +410,23 @@ class ExtensionContext extends BaseConte
this.messenger = new Messenger(this, [mm], sender, filter, delegate);
this.chromeObj = Cu.createObjectIn(this.sandbox, {defineAs: "browser"});
// Sandboxes don't get Xrays for some weird compatibility
// reason. However, we waive here anyway in case that changes.
Cu.waiveXrays(this.sandbox).chrome = this.chromeObj;
- let apis = {
- "storage": "chrome://extensions/content/schemas/storage.json",
- "test": "chrome://extensions/content/schemas/test.json",
- };
-
let incognito = PrivateBrowsingUtils.isContentWindowPrivate(this.contentWindow);
- this.childManager = new ChildAPIManager(this, mm, Object.keys(apis), {
+ this.childManager = new ChildAPIManager(this, mm, ["storage", "test"], {
type: "content_script",
url,
incognito,
});
- for (let api in apis) {
- Schemas.load(apis[api]);
- }
Schemas.inject(this.chromeObj, this.childManager);
injectAPI(api(this), this.chromeObj);
// This is an iframe with content script API enabled. (See Bug 1214658 for rationale)
if (isExtensionPage) {
Cu.waiveXrays(this.contentWindow).chrome = this.chromeObj;
Cu.waiveXrays(this.contentWindow).browser = this.chromeObj;