Closed Bug 1491274 Opened 6 years ago Closed 6 years ago

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

Categories

(WebExtensions :: General, enhancement, P1)

enhancement

Tracking

(firefox64 verified)

VERIFIED FIXED
mozilla64
Iteration:
64.2 - Sep 28
Tracking Status
firefox64 --- verified

People

(Reporter: robwu, Assigned: rpl)

References

Details

Attachments

(1 file)

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+
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
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+
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
https://hg.mozilla.org/mozilla-central/rev/d2e7433921cf
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
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.
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.

Attachment

General

Created:
Updated:
Size: