Bug 1177709 - Avoid a TypeError in browser-content.js by making the _findAsYouType getter a normal property. r=mossop
authoraleth <aleth@instantbird.org>
Tue, 29 Sep 2015 00:01:49 +0200
changeset 264787 7f6d1b40dcb74ce14584ed505dc212cea61566f2
parent 264786 84c62ba95e198b4ff851b07499209e9a57687273
child 264788 91a8ceacc1318be889d6350222d890919360a015
push id65743
push useraleth@instantbird.org
push dateMon, 28 Sep 2015 22:34:59 +0000
treeherdermozilla-inbound@7f6d1b40dcb7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmossop
bugs1177709
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1177709 - Avoid a TypeError in browser-content.js by making the _findAsYouType getter a normal property. r=mossop
toolkit/content/browser-content.js
--- a/toolkit/content/browser-content.js
+++ b/toolkit/content/browser-content.js
@@ -578,21 +578,21 @@ var FindBar = {
   /* Please keep in sync with toolkit/content/widgets/findbar.xml */
   FIND_NORMAL: 0,
   FIND_TYPEAHEAD: 1,
   FIND_LINKS: 2,
   FAYT_LINKS_KEY: "'".charCodeAt(0),
   FAYT_TEXT_KEY: "/".charCodeAt(0),
 
   _findMode: 0,
-  get _findAsYouType() {
-    return Services.prefs.getBoolPref("accessibility.typeaheadfind");
-  },
+  _findAsYouType: false,
 
   init() {
+    this._findAsYouType =
+      Services.prefs.getBoolPref("accessibility.typeaheadfind");
     addMessageListener("Findbar:UpdateState", this);
     Services.els.addSystemEventListener(global, "keypress", this, false);
     Services.els.addSystemEventListener(global, "mouseup", this, false);
   },
 
   receiveMessage(msg) {
     switch (msg.name) {
       case "Findbar:UpdateState":