Split content script-only userScripts API from ext-userScripts.js and user_scripts.json

VERIFIED FIXED in Firefox 64

Status

enhancement
P1
normal
VERIFIED FIXED
10 months ago
9 months ago

People

(Reporter: robwu, Assigned: rpl)

Tracking

(Blocks 1 bug)

unspecified
mozilla64
Dependency tree / graph

Firefox Tracking Flags

(firefox64 verified)

Details

Attachments

(1 attachment)

Reporter

Description

10 months ago
The schemas and implementations of the content-script-side userScripts API (introduced in bug 1437864) and the add-on side userScripts API are fully independent. The implementation of the content-script only logic is just a few lines, whereas the extension process part of the API spans over 100 lines.

Since we put so much efforts into minimizing content proces memory usage elsewhere, we should split these in separate files (user_scripts.json and ext-userScript.js).

I've done something similar before when I introduced the menus.getTargetElement API, so I'll take this bug.
Comment on attachment 9009968 [details]
Bug 1491274 - Split content script-only userScripts API from ext-userScripts.js and user_scripts.json. r?mixedpuppy!,robwu

Shane Caraveo (:mixedpuppy) has approved the revision.
Attachment #9009968 - Flags: review+
Assignee

Comment 3

9 months ago
Hey Rob,
I'm taking this and added you as an additional reviewer on the attached patch (I've been already working on other changes related to these files, and so I thought that it was worth to do it right now).
Assignee: rob → lgreco
Iteration: --- → 64.2 (Sep 28)
Priority: -- → P1
Reporter

Comment 4

9 months ago
Comment on attachment 9009968 [details]
Bug 1491274 - Split content script-only userScripts API from ext-userScripts.js and user_scripts.json. r?mixedpuppy!,robwu

Rob Wu [:robwu] has approved the revision.
Attachment #9009968 - Flags: review+

Comment 5

9 months ago
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/d2e7433921cf
Split content script-only userScripts API from ext-userScripts.js and user_scripts.json. r=robwu,mixedpuppy

Comment 6

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/d2e7433921cf
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Assignee

Comment 7

9 months ago
This is tricky to QA verify manually (which of the API modules are loaded or not loaded in the various Firefox processes), but we could at least verify that the change didn't regressed any of the tests from the list of test cases mentioned in Bug 1437861 comment 44.

Comment 8

9 months ago
No regressions found after running all cases mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=1437861#c44 . Marking bug as verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.