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 376365 432f86adc83ea171bda9c04a809c3eb80f1eb608
parent 376364 06b5866b0bd8c7023479c9ea031713c3df5aa7aa
child 376366 0842f492e64a2fe4b9139fed3cae0fea5a719583
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, jcristau
bugs1341338
milestone53.0a2
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
@@ -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>