diff -r 000000000000 -r 6474c204b198 browser/devtools/debugger/test/addon-source/browser_dbg_addon4/bootstrap.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/browser/devtools/debugger/test/addon-source/browser_dbg_addon4/bootstrap.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,23 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +const { interfaces: Ci, classes: Cc } = Components; + +function startup(aParams, aReason) { + Components.utils.import("resource://gre/modules/Services.jsm"); + let res = Services.io.getProtocolHandler("resource") + .QueryInterface(Ci.nsIResProtocolHandler); + res.setSubstitution("browser_dbg_addon4", aParams.resourceURI); + + // Load a JS module + Components.utils.import("resource://browser_dbg_addon4/test.jsm"); +} + +function shutdown(aParams, aReason) { + // Unload the JS module + Components.utils.unload("resource://browser_dbg_addon4/test.jsm"); + + let res = Services.io.getProtocolHandler("resource") + .QueryInterface(Ci.nsIResProtocolHandler); + res.setSubstitution("browser_dbg_addon4", null); +}