Bug 1341338 - feedType is undefined in FeedConverter#handleResult. r=jaws
authorMark Banner <standard8@mozilla.com>
Tue, 21 Feb 2017 07:43:59 +0000
changeset 343992 a437b95a0de44c025192f5d2a98c13bc0feb6a90
parent 343991 fc3485436aa53c9430983f5ae095010045a77feb
child 343993 efbbe123d5afb8cf85c79a8e7c58f85d184f0ccb
push id37720
push usermbanner@mozilla.com
push dateTue, 21 Feb 2017 19:16:15 +0000
treeherderautoland@a437b95a0de4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1341338
milestone54.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 1341338 - feedType is undefined in FeedConverter#handleResult. r=jaws MozReview-Commit-ID: tZAdpmkNWp
browser/components/feeds/FeedConverter.js
browser/components/feeds/content/subscribe.js
browser/components/feeds/content/subscribe.xhtml
--- a/browser/components/feeds/FeedConverter.js
+++ b/browser/components/feeds/FeedConverter.js
@@ -218,17 +218,17 @@ FeedConverter.prototype = {
               LOG("unexpected handler: " + handler);
               // fall through -- let feed service handle error
             case "bookmarks":
             case "client":
             case "default":
               try {
                 let title = feed.title ? feed.title.plainText() : "";
                 let desc = feed.subtitle ? feed.subtitle.plainText() : "";
-                let feedReader = safeGetCharPref(getPrefActionForType(feedType), "bookmarks");
+                let feedReader = safeGetCharPref(getPrefActionForType(feed.type), "bookmarks");
                 feedService.addToClientReader(result.uri.spec, title, desc, feed.type, feedReader);
                 return;
               } catch (ex) { /* fallback to preview mode */ }
           }
         }
       }
 
       let ios =
--- a/browser/components/feeds/content/subscribe.js
+++ b/browser/components/feeds/content/subscribe.js
@@ -1,13 +1,15 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+/* global BrowserFeedWriter */
+
 var SubscribeHandler = {
   /**
    * The nsIFeedWriter object that produces the UI
    */
   _feedWriter: null,
 
   init: function SH_init() {
     this._feedWriter = new BrowserFeedWriter();
--- a/browser/components/feeds/content/subscribe.xhtml
+++ b/browser/components/feeds/content/subscribe.xhtml
@@ -49,16 +49,17 @@
           </label>
           <button id="subscribeButton">&feedSubscribeNow;</button>
         </div>
       </div>
       <div id="feedHeaderContainerSpacer"/>
     </div>
 
     <script type="application/javascript">
+      /* import-globals-from subscribe.js */
       SubscribeHandler.init();
     </script>
 
     <div id="feedBody">
       <div id="feedTitle">
         <a id="feedTitleLink">
           <img id="feedTitleImage"/>
         </a>