Bug 1295082 - Put Extension in BaseContext r=kmag
ExtensionContext in Extension.jsm has |extension| as an instance member, so use it instead of passing |extension| to registerSchemaAPI's callback. And to make sure that this pattern also works in content processes, move the |extension| member to BaseContext. MozReview-Commit-ID: BgsGGCPQxJR
This commit is contained in:
@@ -93,7 +93,8 @@ extensions.on("shutdown", (type, extension) => {
|
||||
});
|
||||
/* eslint-enable mozilla/balanced-listeners */
|
||||
|
||||
extensions.registerSchemaAPI("alarms", (extension, context) => {
|
||||
extensions.registerSchemaAPI("alarms", context => {
|
||||
let {extension} = context;
|
||||
return {
|
||||
alarms: {
|
||||
create: function(name, alarmInfo) {
|
||||
|
||||
Reference in New Issue
Block a user