Bespin embedded 0.7.1 does not work inside xulrunner-based apps because of localStorage



9 years ago
9 years ago


(Reporter: glazou, Assigned: julian.viereck)





9 years ago
Bespin Embedded 0.7.1 calls window.localStorage and window.localStorage.history,
and those are not available from an <iframe> or <browser> xul tag inside a
xulrunner-based application... So 0.7.1 is for the time being unusable with
xulrunner :-(

LocalStorage is (seen from here) used for user settings and history of edited
documents, all things that are irrelevant in the case of the embedded Bespin and
should be moved outside of BespinEmbedded.js, preserving the client-server tool
and allowing the embedded version to work again with XR.
It also happens when using an HTML file instead of a XUL file for your UI in a xulrunner app. The error can be observed by installing my despin plugin:

Comment 2

9 years ago
Unfortunately, given the changes that this would require and where we're at with releases, a fix for this is likely not going to land in 0.7.x and will have to wait for the "Theora" release of Bespin.
Target Milestone: --- → 0.8

Comment 3

9 years ago
Workarounded this by using resource: URL instead of chrome:.
Sadly this didn't work for me, albeit using gBrowser.addTab:

-    var newTab = gBrowser.addTab('chrome://despin/content/editor.html');
+    var newTab = gBrowser.addTab('resource://despin/content/editor.html');

Comment 5

9 years ago
(In reply to comment #3)

> Workarounded this by using resource: URL instead of chrome:.

Satyr, you just made my day !!! I confirm this work around works, see

Kevin, you should probably document this workaround somewhere in the doc pages.

Comment 6

9 years ago
If I recall correctly, the localStorage reference that was causing this problem was in SproutCore. This is likely not a problem now. (I don't know if jQuery has any trouble running in XULRunner... that would be good to know.)
Assignee: nobody → jviereck

Comment 7

9 years ago
As with changeset a0d37bb62076, the fileHistory is now in a separate plugin. 
That means, if you don't inlcude the "file_history" plugin when building the 
embedded release, you shouldn't have problems with the localStorage anymore. I 
also added some more tests to make sure that the localStorage object is not 
accessed if it's not around.

Due to these changes, I mark this bug as fixed.
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.