From a294f71264ec6b18ab125399ffaf7fea7d09acea Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Wed, 16 Feb 2011 20:46:10 -0500 Subject: [PATCH] Fix issue with feeding keys from map actions executed after a timeout. Closes issue #378. --- common/content/events.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/common/content/events.js b/common/content/events.js index 4929c25e..2d0b8217 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -34,10 +34,17 @@ var ProcessorStack = Class("ProcessorStack", { }, notify: function () { - this.execute(Events.KILL, true); + let kill = events.withSavedValues(["processor"], function () { + events.processor = null; + return this.execute(Events.KILL, true); + }, this); + + if (kill) + events.processor = null; }, execute: function execute(result, force) { + if (force && this.actions.length) this.processors.length = 0; @@ -90,9 +97,6 @@ var ProcessorStack = Class("ProcessorStack", { events.feedevents(null, list, { skipmap: true, isMacro: true, isReplay: true }); } - if (force && this.processors.length === 0) - events.processor = null; - return this.processors.length === 0; },