This can be fixed with a split model. Chromium sometimes introduces fairly ad-hoc APIs (there was one to hook into HTTP requests, first declaratively which was discontinued, then with JS-side filtering which seems to be used by the ABP port); Jetpack add-ons can also use custom modules that hook into the full Firefox API. That way, the part that needs care and auditing for memory/lifetime issues can remain small.
https://addons.mozilla.org/en-US/developers/docs/sdk/latest/...