michael@0: // This test must be run with debugging already enabled michael@0: michael@0: function run_test() { michael@0: const Cc = Components.classes; michael@0: const Ci = Components.interfaces; michael@0: const DebuggerService = Cc["@mozilla.org/js/jsd/debugger-service;1"]; michael@0: const jsdIDebuggerService = Ci.jsdIDebuggerService; michael@0: var jsd = DebuggerService.getService(jsdIDebuggerService); michael@0: michael@0: do_check_true(jsd.isOn); michael@0: michael@0: jsd.scriptHook = { michael@0: onScriptCreated: function(script) { michael@0: // Just the presence of this will trigger the script to be handed michael@0: // to JSD and trigger the crash michael@0: }, michael@0: onScriptDestroyed: function(script) { michael@0: } michael@0: } michael@0: michael@0: eval("4+4"); michael@0: eval("4+4"); // Will be found in the eval cache michael@0: }