Hello,
I need to override the new Firefox function called ‘clearPluginCookies’ (replace it temporarily with a dummy function).
See Firefox\browser\omni.ja\chrome\browser\content\browser\sanitize.js, line 248.
if ( typeof Sanitizer !== 'function' ) {
Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Components.interfaces.mozIJSSubScriptLoader)
.loadSubScript("chrome://browser/content/sanitize.js", null);
}
Sanitizer.prototype.items.clearPluginCookies = undefined;
Sanitizer.prototype.items.clearPluginCookies = function()
{;}
//Exception during sanitize: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getBoolPref]"
//nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://browser/content/sanitize.js ::
//Sanitizer.prototype.sanitize/itemsToClear< :: line 66" data: no]
NOTE: If you look closer at the original function clearPluginCookies, you will see that this function does not necessarily return promises: See especially the scope of
if (!this.range || age >= 0) {.....}
However I also tried to return a list of promises, and even tried to replace the function with the exact original FF function.
Always the same exception.
Anyone any ideas?