Bug 1341338 - feedType is undefined in FeedConverter#handleResult. r=jaws
authorMark Banner <standard8@mozilla.com>
Tue, 21 Feb 2017 07:43:59 +0000
changeset 373067 a437b95a0de44c025192f5d2a98c13bc0feb6a90
parent 373066 fc3485436aa53c9430983f5ae095010045a77feb
child 373068 efbbe123d5afb8cf85c79a8e7c58f85d184f0ccb
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1341338
milestone54.0a1
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>