From ef2cc287f071c13b500454a7262174a3fdd59f9d Mon Sep 17 00:00:00 2001 From: John Foerch Date: Mon, 17 May 2010 00:52:05 -0400 Subject: [PATCH] buffer.destroy: prevent modalities from accessing dead browser Since XULRunner 1.9.2, and the new focus system, disposing of a xul:browser triggers a "blur" event. This results in Conkeror calling set_input_mode, and causing modalities to try to access disposed properties of the dead browser, resulting in console warnings. This patch fixes that. --- modules/buffer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/buffer.js b/modules/buffer.js index ff81a1b..f1b9ea3 100644 --- a/modules/buffer.js +++ b/modules/buffer.js @@ -194,7 +194,10 @@ buffer.prototype = { } }, - destroy: function () {}, + destroy: function () { + // prevent modalities from accessing dead browser + this.modalities = []; + }, set_input_mode: function () { if (this.input_mode) -- 2.11.4.GIT