Bug 815475 - Fix pfjs when there is no integrated findbar (pdfjs 0.6.39 broke Firefox metro). r=dtownsend
authorBrian R. Bondy <netzen@gmail.com>
Tue, 27 Nov 2012 15:32:04 -0500
changeset 114269 b19684c7502ac242fb6ef874f633066a9a0deb72
parent 114268 93ca9158ae3e2975714630d6a1daeb56fb538292
child 114270 8375549bb321502e2cc963dcda89c516203452b7
push id23913
push useremorley@mozilla.com
push dateWed, 28 Nov 2012 17:11:31 +0000
treeherdermozilla-central@17c267a881cf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdtownsend
bugs815475
milestone20.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 815475 - Fix pfjs when there is no integrated findbar (pdfjs 0.6.39 broke Firefox metro). r=dtownsend
browser/extensions/pdfjs/components/PdfStreamConverter.js
--- a/browser/extensions/pdfjs/components/PdfStreamConverter.js
+++ b/browser/extensions/pdfjs/components/PdfStreamConverter.js
@@ -343,16 +343,17 @@ ChromeActions.prototype = {
   },
   pdfBugEnabled: function() {
     return getBoolPref(PREF_PREFIX + '.pdfBugEnabled', false);
   },
   supportsIntegratedFind: function() {
     // Integrated find is only supported when we're not in a frame and when the
     // new find events code exists.
     return this.domWindow.frameElement === null &&
+           getChromeWindow(this.domWindow).gFindBar &&
            'updateControlState' in getChromeWindow(this.domWindow).gFindBar;
   },
   fallback: function(url, sendResponse) {
     var self = this;
     var domWindow = this.domWindow;
     var strings = getLocalizedStrings('chrome.properties');
     var message = getLocalizedString(strings, 'unsupported_feature');