summaryrefslogtreecommitdiff
path: root/common/modules/finder.jsm
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-10-01 23:02:00 -0400
committerKris Maglione <maglione.k@gmail.com>2011-10-01 23:02:00 -0400
commit84a68bff9a38fd578811fb1b26f3cbd4d13e6a5e (patch)
tree5e5a5020c81c99d1aac0c8028440758c88c9ab23 /common/modules/finder.jsm
parentc9583ac72f401844de5136c82155c0d0dc5ae21f (diff)
downloadpentadactyl-84a68bff9a38fd578811fb1b26f3cbd4d13e6a5e.tar.gz
Add util.weakReference that won't crash if you pass null.
Diffstat (limited to 'common/modules/finder.jsm')
-rw-r--r--common/modules/finder.jsm6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/modules/finder.jsm b/common/modules/finder.jsm
index a0d88aeb..fc99f31f 100644
--- a/common/modules/finder.jsm
+++ b/common/modules/finder.jsm
@@ -339,10 +339,10 @@ var RangeFinder = Module("rangefinder", {
*/
var RangeFind = Class("RangeFind", {
init: function init(window, content, matchCase, backward, elementPath, regexp) {
- this.window = Cu.getWeakReference(window);
+ this.window = util.weakReference(window);
this.content = content;
- this.baseDocument = Cu.getWeakReference(this.content.document);
+ this.baseDocument = util.weakReference(this.content.document);
this.elementPath = elementPath || null;
this.reverse = Boolean(backward);
@@ -381,7 +381,7 @@ var RangeFind = Class("RangeFind", {
this.range.selectionController.scrollSelectionIntoView(
this.range.selectionController.SELECTION_NORMAL, 0, false);
- this.store.focusedFrame = Cu.getWeakReference(range.startContainer.ownerDocument.defaultView);
+ this.store.focusedFrame = util.weakReference(range.startContainer.ownerDocument.defaultView);
},
cancel: function cancel() {