Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception occurs at searching backwards( and resolution) #14

Open
kpeejp opened this issue Oct 5, 2014 · 2 comments
Open

Exception occurs at searching backwards( and resolution) #14

kpeejp opened this issue Oct 5, 2014 · 2 comments

Comments

@kpeejp
Copy link

kpeejp commented Oct 5, 2014

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
Copy link
Owner

piroor commented Oct 5, 2014

Could you copy the error shown in the error console and paste it here?

@kpeejp
Copy link
Author

kpeejp commented Oct 5, 2014

[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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants