Bug 1465089 - Do not highlight the debugger on interrupts. r=nchevobbe
--- a/devtools/client/framework/attach-thread.js
+++ b/devtools/client/framework/attach-thread.js
@@ -8,23 +8,25 @@ const Services = require("Services");
const defer = require("devtools/shared/defer");
const {LocalizationHelper} = require("devtools/shared/l10n");
const L10N = new LocalizationHelper("devtools/client/locales/toolbox.properties");
function handleThreadState(toolbox, event, packet) {
// Suppress interrupted events by default because the thread is
// paused/resumed a lot for various actions.
- if (event !== "paused" || packet.why.type !== "interrupted") {
- // TODO: Bug 1225492, we continue emitting events on the target
- // like we used to, but we should emit these only on the
- // threadClient now.
- toolbox.target.emit("thread-" + event);
+ if (event === "paused" && packet.why.type === "interrupted") {
+ return;
}
+ // TODO: Bug 1225492, we continue emitting events on the target
+ // like we used to, but we should emit these only on the
+ // threadClient now.
+ toolbox.target.emit("thread-" + event);
+
if (event === "paused") {
toolbox.highlightTool("jsdebugger");
if (packet.why.type === "debuggerStatement" ||
packet.why.type === "breakpoint" ||
packet.why.type === "exception") {
toolbox.raise();
toolbox.selectTool("jsdebugger", packet.why.type);