3

I have a Firefox extension that supports Firefox 3+, and SQLite database is important for my extension. I saw on the MDN that the API might change and it`s "unfrozen", should I be worried about it?

The API is currently "unfrozen", which means it is subject to change at any time; in fact, it has changed somewhat with each release of Firefox since it was introduced, and will likely continue to do so for a while.

Wladimir Palant
  • 56,865
  • 12
  • 98
  • 126
Yosi
  • 2,936
  • 7
  • 39
  • 64

2 Answers2

4

This warning is probably outdated, it has been added to the original version of the document years ago and hasn't been updated since. Fact is, starting with Firefox 4 all APIs are unfrozen and could change. But that shouldn't really be a reason to worry. As SQLite access goes, the API seems pretty mature by now and Mozilla developers are mostly tweaking performance without introducing breaking changes. The most important change was the introduction of asynchronous API in Firefox 3.5 and the deprecation of the synchronous API. But as long as you only use asynchronous API you should be on the safe side (I cannot imagine that you really need to support the ancient Firefox 3.0 release, I guess that you actually meant Firefox 3.6).

Wladimir Palant
  • 56,865
  • 12
  • 98
  • 126
  • Hi Wladimir,thanks for your answer,I meant for "ancient" firefox 3.0 release, currently I am supporting firefox 3.0+, so firefox 3-3.5 supports the sync api and firefox 4+ supports the async api, those are the differences? – Yosi Oct 16 '11 at 22:36
  • @Yosy: Firefox 3.0 only supports the sync API, starting with Firefox 3.5 the async API is supported as well. You really shouldn't use the sync API, it was responsible for some of the worst performance issues in Firefox 3.0. And you should seriously consider dropping support for Firefox 3.0/3.5. – Wladimir Palant Oct 17 '11 at 05:27
0

For something so widely used I doubt it but it's easy enough to write code to work around that and keep your addon backwards compatible (at least in javascript). What I ended up doing is abstracting away methods that did change and wrapping them in my own calls that would do something like

if (methodInFF3) doFF3Method();
else doNewMethod();

or something like that. This way when things changed I only had to change the code in one place instead of many but then again the first time it happened I had to change the code everywhere. For SQLite I probably wouldn't worry too much though but that's just me, just make sure that when a new release comes out you check the docs to see if anything has been changed and you should be fine.

Jesus Ramos
  • 22,940
  • 10
  • 58
  • 88
  • You might be confusing it with `localStorage`. As to SQLite access, it already changed - synchronous access has been deprecated and might get removed in future. – Wladimir Palant Oct 03 '11 at 18:07