Open Bug 1770200 Opened 3 years ago Updated 2 years ago

Remove no longer used Cu.blockScriptForGlobal IDL method and associated machinery

Categories

(Core :: XPConnect, task)

task

Tracking

()

People

(Reporter: mgaudet, Unassigned)

Details

It appears that Cu.blockScriptForGlobal and unblockScriptForGlobal are no longer used outside a test file and can be removed, along with the xpc::Scriptability script block count machinery.

Interesting! I'd thought that was the machinery I'd introduced for NoScript, but looks like I actually introduced it for unsafe channels, and the need for that presumably went away with Fission.

Looks like the thing I made for NoScript was the domain policy API, which also appears to be unused now, in which case we can perhaps remove it too? Kris, any idea how NoScript does its thing today? I assume there's some WebExtension policy API, but what does that hook into underneath?

Flags: needinfo?(kmaglione+bmo)

Sorry, I started looking into this and then it fell off my radar

I'm not sure exactly what NoScript does now, but the last time I looked into it, it used a variety of strategies, including request blocking and response data filtering, to get fine grained control of what scripts run on which page. I believe it also sometimes uses the privacy API to get coarser grained control of what happens in the entire browser.

Either way, I don't think we have any particular need for the blockScriptForGlobal APIs anymore.

I am a bit surprised that the Scriptability script block count isn't used anymore. I seem to recall it being used in some other places, but I may just be thinking of the old XUL NoScript code.

Flags: needinfo?(kmaglione+bmo)
You need to log in before you can comment on or make changes to this bug.