Move API permission definitions to the schemas

RESOLVED FIXED in Firefox 50

Status

()

Toolkit
WebExtensions: Untriaged
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: kmag, Assigned: kmag)

Tracking

unspecified
mozilla50
Points:
---

Firefox Tracking Flags

(firefox50 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

Comment hidden (empty)
Created attachment 8761915 [details]
Bug 1279392: [webext] Move API permission definitions to the schemas.

Review commit: https://reviewboard.mozilla.org/r/58930/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58930/
Attachment #8761915 - Flags: review?(aswan)
Blocks: 1263011

Comment 2

2 years ago
Comment on attachment 8761915 [details]
Bug 1279392: [webext] Move API permission definitions to the schemas.

https://reviewboard.mozilla.org/r/58930/#review56134

nice!
Can we remove `registerPrivilegedAPI()` now too

::: toolkit/components/extensions/test/xpcshell/test_ext_schemas.js:1074
(Diff revision 1)
>                  /not contain the unexpected properties \[foo, quux\], or be an array value/);
>  });
> +
> +
> +let permissionsJson = [
> +  {namespace: "noPerms",

the intendation here is strange but as long as eslint doesn't seem to care, its not a big deal.
Attachment #8761915 - Flags: review?(aswan) → review+
https://reviewboard.mozilla.org/r/58930/#review56134

Probably. I can't think of anywhere we'll need it again.
https://reviewboard.mozilla.org/r/58930/#review56134

> the intendation here is strange but as long as eslint doesn't seem to care, its not a big deal.

Yeah, it is a bit strange. I decided copy the formatting from the other definitions, and ESLint doesn't mind.
(In reply to Andrew Swan [:aswan] from comment #2)
> Can we remove `registerPrivilegedAPI()` now too

I'm going to file a follow-up for this, since I think there's some other
support code we can remove along with it.
https://hg.mozilla.org/integration/fx-team/rev/a00cf073f5c00380d4e42b13bc0cd3146b708845
Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
Backed out for failing mochitest test_ext_contentscript_create_iframe.html at least on Linux x64 opt:

https://hg.mozilla.org/integration/fx-team/rev/4eb7afe97b2b470c9276a8af9c23910cdbd02563

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=fx-team&revision=a00cf073f5c00380d4e42b13bc0cd3146b708845
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=9968479&repo=fx-team
11:09:49     INFO -  86 INFO TEST-START | toolkit/components/extensions/test/mochitest/test_ext_contentscript_create_iframe.html
11:09:50     INFO -  TEST-INFO | started process screentopng
11:09:51     INFO -  TEST-INFO | screentopng: exit 0
11:09:51     INFO -  87 INFO SpawnTask.js | Entering test test_contentscript_create_iframe
11:09:51     INFO -  88 INFO Extension loaded
11:09:51     INFO -  89 INFO extension loaded
11:09:51     INFO -  90 INFO TEST-UNEXPECTED-FAIL | toolkit/components/extensions/test/mochitest/test_ext_contentscript_create_iframe.html | the created iframe should not be able to use privileged APIs (tabs)
11:09:51     INFO -      testHandler@SimpleTest/ExtensionTestUtils.js:61:7
11:09:51     INFO -      testResult@SimpleTest/ExtensionTestUtils.js:71:36
11:09:51     INFO -  Not taking screenshot here: see the one that was previously logged
11:09:51     INFO -  91 INFO TEST-UNEXPECTED-FAIL | toolkit/components/extensions/test/mochitest/test_ext_contentscript_create_iframe.html | the created iframe should not be able to use privileged APIs (windows)
11:09:51     INFO -      testHandler@SimpleTest/ExtensionTestUtils.js:61:7
11:09:51     INFO -      testResult@SimpleTest/ExtensionTestUtils.js:71:36
Flags: needinfo?(kmaglione+bmo)
https://hg.mozilla.org/integration/fx-team/rev/5003caf3aa25dad509e53c68d2ee39de58fe5ec5
Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
Flags: needinfo?(kmaglione+bmo)

Comment 9

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/5003caf3aa25
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox50: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.