{"id":2720,"date":"2011-07-19T13:41:53","date_gmt":"2011-07-19T20:41:53","guid":{"rendered":"http:\/\/blog.mozilla.org\/addons\/?p=2720"},"modified":"2011-07-20T15:53:59","modified_gmt":"2011-07-20T22:53:59","slug":"firefox-7-compat-looking-to-8","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/addons\/2011\/07\/19\/firefox-7-compat-looking-to-8\/","title":{"rendered":"Firefox 7 add-on compatibility, and looking forward to 8"},"content":{"rendered":"<p>Firefox 7 was moved to the Aurora channel a little over a week ago, and we&#8217;re preparing to run the automated compatibility upgrade for all add-ons on AMO that are already compatible with Firefox 6. If you want to benefit from these compatibility bumps, your add-on should have a maximum compatibility of 6.* at present. If no compatibility problems are detected, we will automatically increase it to 7.* when the validation is run.<\/p>\n<p>Our analysis of the bug fixes for Firefox 7 has produced the following list of notable changes for add-on developers. They are mostly XPCOM interface removals, some of them currently in use by add-ons listed on AMO. Please have a look and update your add-on code accordingly:<\/p>\n<ul>\n<li><strong>The encode and decode methods in nsIJSON have been removed.<\/strong> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=645922\">Bug 645922<\/a>. This fix affects a very large portion of add-ons, so there&#8217;s an effort <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=672063\">aiming to revert it<\/a>. Either way, we strongly recommend you to use the <a href=\"https:\/\/developer.mozilla.org\/En\/Using_native_JSON\">global JSON object<\/a> and the parse and stringify functions instead of the XPCOM component.<\/li>\n<li>(Updated) The nsINavHistoryObserver and nsINavBoorkmarkObserver interfaces have changed to better accommodate Firefox Sync. <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=633266\">Bug 633266<\/a>. Several of its methods have a new parameter (a GUID). Since add-ons are normally in the observer position, this just means you get more data, so no change is necessary. Binary consumers will need to update the function signatures, though.<\/li>\n<li>(Updated) A number of methods have been removed from the nsIDOMFile interface, notably getDataAsURL and getAsBinary. <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=661876\">Bug 661876<\/a>. Equivalent functions are available in other objects, like FileReader.<\/li>\n<li>A few other interfaces were removed: nsIDOM3Node (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=659053\">bug 659053<\/a>), nsIDOM3TypeInfo (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=660539\">bug 660539<\/a>), schemaTypeInfo (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=660539\">bug 660539<\/a>), nsIDOMNSDocument (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=658906\">bug 658906<\/a>), and nsIDOMDocumentStyle (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=658904\">bug 658904<\/a>).<\/li>\n<\/ul>\n<p>More details can be found in <a href=\"https:\/\/developer.mozilla.org\/en\/Firefox_7_for_developers\">Firefox 7 for Developers<\/a>, as well as some new features that really exciting to have:<\/p>\n<ul>\n<li>It is now possible to unload JS modules, making them a more viable option for restartless add-ons. <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=481603\">Bug 481603<\/a>.<\/li>\n<li><a href=\"https:\/\/developer.mozilla.org\/en\/Extensions\/Inline_Options\">Inline preferences<\/a>. You can now display your preferences panel inside the Add-ons Manager, instead of using a separate window. While there are limitations to what you can do with this, it should work fine for a large subset of add-ons. Plus, it also works for restartless add-ons, which is a big win.<\/li>\n<\/ul>\n<p>If there are any other compatibility troubles you have run into while testing on Firefox 7 that hasn&#8217;t been mentioned here, please leave a comment below.<\/p>\n<h3>Firefox 8<\/h3>\n<p>It&#8217;s still early to worry about Firefox 8, but there are a couple of big changes coming your way that I thought I should mention as soon as possible:<\/p>\n<ul>\n<li><strong>The nsIDOMWindowInternal interface will be removed<\/strong>. <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=670235\">Bug 670235<\/a>. Judging by the patch, you should be doing QI to nsIDOMWindow instead.<\/li>\n<li>There is work being done to implement an incremental GC for the JS engine. This could potentially affect add-ons with binary components that use the JSAPI to create a custom JSClass and<br \/>\nobjects of that class, <em>and<\/em> the objects of the custom class have a custom GC trace function. It sounds fairly specific to actually be common, but I just want to throw this out there in case anybody is affected by it. You can contact me if you need more information about this.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/developer.mozilla.org\/en\/Firefox_8_for_developers\">Firefox 8 for developers<\/a> is already available and should be growing in length in the following weeks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Firefox 7 was moved to the Aurora channel a little over a week ago, and we&#8217;re preparing to run the automated compatibility upgrade for all add-ons on AMO that are &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/addons\/2011\/07\/19\/firefox-7-compat-looking-to-8\/\">Read more<\/a><\/p>\n","protected":false},"author":173,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[388,44,295,121],"tags":[778,805,278877,278873,278876,7112,7113],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Firefox 7 add-on compatibility, and looking forward to 8 - Mozilla Add-ons Community Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/addons\/2011\/07\/19\/firefox-7-compat-looking-to-8\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jorge Villalobos\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2011\/07\/19\/firefox-7-compat-looking-to-8\/\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/2011\/07\/19\/firefox-7-compat-looking-to-8\/\",\"name\":\"Firefox 7 add-on compatibility, and looking forward to 8 - Mozilla Add-ons Community Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\"},\"datePublished\":\"2011-07-19T20:41:53+00:00\",\"dateModified\":\"2011-07-20T22:53:59+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/a098261b4b5510d408ff31f492606925\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2011\/07\/19\/firefox-7-compat-looking-to-8\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/addons\/2011\/07\/19\/firefox-7-compat-looking-to-8\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2011\/07\/19\/firefox-7-compat-looking-to-8\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/addons\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Firefox 7 add-on compatibility, and looking forward to 8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/\",\"name\":\"Mozilla Add-ons Community Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/a098261b4b5510d408ff31f492606925\",\"name\":\"Jorge Villalobos\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6d1966118f16e4b99a6e3ad07883be33?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6d1966118f16e4b99a6e3ad07883be33?s=96&d=mm&r=g\",\"caption\":\"Jorge Villalobos\"},\"description\":\"Jorge is the Product Manager for addons.mozilla.org\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/author\/jvillalobosmozilla-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Firefox 7 add-on compatibility, and looking forward to 8 - Mozilla Add-ons Community Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/addons\/2011\/07\/19\/firefox-7-compat-looking-to-8\/","twitter_misc":{"Written by":"Jorge Villalobos","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/addons\/2011\/07\/19\/firefox-7-compat-looking-to-8\/","url":"https:\/\/blog.mozilla.org\/addons\/2011\/07\/19\/firefox-7-compat-looking-to-8\/","name":"Firefox 7 add-on compatibility, and looking forward to 8 - Mozilla Add-ons Community Blog","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/addons\/#website"},"datePublished":"2011-07-19T20:41:53+00:00","dateModified":"2011-07-20T22:53:59+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/a098261b4b5510d408ff31f492606925"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/addons\/2011\/07\/19\/firefox-7-compat-looking-to-8\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/addons\/2011\/07\/19\/firefox-7-compat-looking-to-8\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/addons\/2011\/07\/19\/firefox-7-compat-looking-to-8\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/addons\/"},{"@type":"ListItem","position":2,"name":"Firefox 7 add-on compatibility, and looking forward to 8"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/addons\/#website","url":"https:\/\/blog.mozilla.org\/addons\/","name":"Mozilla Add-ons Community Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/a098261b4b5510d408ff31f492606925","name":"Jorge Villalobos","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6d1966118f16e4b99a6e3ad07883be33?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6d1966118f16e4b99a6e3ad07883be33?s=96&d=mm&r=g","caption":"Jorge Villalobos"},"description":"Jorge is the Product Manager for addons.mozilla.org","url":"https:\/\/blog.mozilla.org\/addons\/author\/jvillalobosmozilla-com\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/2720"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/users\/173"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/comments?post=2720"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/2720\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media?parent=2720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/categories?post=2720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/tags?post=2720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}