Bug 1341338 - feedType is undefined in FeedConverter#handleResult. r=jaws, a=jcristau
authorMark Banner <standard8@mozilla.com>
Tue, 21 Feb 2017 07:43:59 +0000
changeset 492859 08169479d28fb049c61104dff59f71f030fee0da
parent 492858 37d108f28d69fd4171f9b94f2840e5bbf71fc6f9
child 492860 484c20783a1b530cc00c9e2a2cd93ebf3026d2e3
push id47617
push userbmo:rail@mozilla.com
push dateFri, 03 Mar 2017 03:42:47 +0000
reviewersjaws, jcristau
bugs1341338
milestone52.0
Bug 1341338 - feedType is undefined in FeedConverter#handleResult. r=jaws, a=jcristau 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
@@ -219,17 +219,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>