Exception occurs at searching backwards( and resolution)
Opened this issue · 2 comments
kpeejp commented
In a year, an exception occurs at searching backwards on firefox33.0-, vimperator 3.8.2+migemo-find.js.
I modify xmXMigemoTextUtils.js as following, and this problem is resolved now.
Does this become your reference?
@diff -u {a,b}/xmXMigemoTextUtils.js
--- a/xmXMigemoTextUtils.js 2014-10-05 22:15:36.146800000 +0900
+++ b/xmXMigemoTextUtils.js 2014-10-04 00:49:30.591400000 +0900
@@ -510,7 +510,8 @@
var utils = w.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils);
- var nodes = utils.nodesFromRect(
+ try {
+ var nodes = utils.nodesFromRect(
0,
0,
this.visibleNodeFilter.minPixels,
@@ -520,6 +521,11 @@
true,
false
);
+ }
+ catch(e){
+ this.visibleNodeFilter.clear();
+ return aDocument.documentElement;
+ }
if (aBackward) {
let i = 0,
maxi = nodes.length;
piroor commented
Could you copy the error shown in the error console and paste it here?
kpeejp commented
[Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIDOMWindowUtils.nodesFromRect]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: file:///<--nip-->/profile/extensions/%7B01F8DAE3-FCF4-43D6-80EA-1223B2A9F025%7D/components/xmXMigemoTextUtils.js :: xmXMigemoTextUtils.prototype.findFirstVisibleNode :: line 513" data: no]