Closed Bug 597936 Opened 15 years ago Closed 12 years ago

Get tbpl.mozilla.org working with Opera

Categories

(Tree Management Graveyard :: TBPL, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mounir, Assigned: mounir)

References

Details

Attachments

(1 file)

It looks like the error is: JavaScript - http://tests.themasta.com/tinderboxpushlog/ Uncaught exception: SyntaxError: JSON.parse: Unable to parse value: undefin Error thrown at line 100, column 4 in <anonymous function: _mostRecentlyUsedTrees>(): if (JSON.parse(this._storage.mostRecentlyUsedTrees).length != 3) called from line 110, column 4 in UserInterface__refreshMostRecentlyUsedTrees(): if (this._mostRecentlyUsedTrees().indexOf(this._treeName) == -1) called from line 19, column 4 in UserInterface_init(controller): this._refreshMostRecentlyUsedTrees(); called from line 40, column 4 in Controller_init() in http://tests.themasta.com/tinderboxpushlog/js/Controller.js: UserInterface.init(this); called from line 3, column 4 in http://tests.themasta.com/tinderboxpushlog/js/script.js: Controller.init();
Summary: Tinderboxpushlog gets stuck with "Loading Tinderbox and pushlog." with Opera 10.70 → Tinderboxpushlog gets stuck on "Loading Tinderbox and pushlog." with Opera 10.70
This is weird, this._storage.mostRecentlyUsedTrees should not be undefined, we check for that case in the lines above the one that causes the exception. Opera does not serialize an empty array [] as undefined does it? if (!("mostRecentlyUsedTrees" in this._storage)) this._setMostRecentlyUsedTrees([]); if (JSON.parse(this._storage.mostRecentlyUsedTrees).length != 3)
TBH, I'm not a js hacker nor an Opera user. I was just curious to see if tbpl was working correctly with other browsers. If you can write a small test case, I can test it.
Assignee: nobody → mounir.lamouri
Summary: Tinderboxpushlog gets stuck on "Loading Tinderbox and pushlog." with Opera 10.70 → Get tbpl.mozilla.org working with Opera
It sounds like "foo" in this._storage will always return 'true' with Opera, that's why we have this 'undefined' error. I was able to fix this by adding "|| !this._storage.mostRecentlyUsedTrees". It should work with all browsers. However, with this fixed, I got an alert telling me that the browser is unsupported but I've no idea where this could come from given that the string doesn't seem to be in tbpl repository. (I hope it doesn't come from google apis.)
Attachment #512140 - Flags: review?(arpad.borsos)
(In reply to comment #3) > However, with this fixed, I got an alert telling me that the browser is > unsupported but I've no idea where this could come from given that the string > doesn't seem to be in tbpl repository. (I hope it doesn't come from google > apis.) It comes very likely from our use of google's jsapi...
Actually, Google's API is only used for sheriff/buildduty so it's not making everything failing. However, _getPendingOrRunningBuilds in Data.js is failing (it goes here: https://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/file/c929a1420853/js/Data.js#l511).
Attachment #512140 - Flags: review?(mstange)
Comment on attachment 512140 [details] [diff] [review] First patch [checked-in] Strange behavior, but easy fix. Any idea why Opera behaves that way?
Attachment #512140 - Flags: review?(mstange)
Attachment #512140 - Flags: review?(arpad.borsos)
Attachment #512140 - Flags: review+
Attachment #512140 - Attachment description: First patch → First patch [checked-in]
(In reply to comment #6) > Comment on attachment 512140 [details] [diff] [review] > First patch [checked-in] > > Strange behavior, but easy fix. Any idea why Opera behaves that way? No idea. I have to say I don't really want to check deeper ;)
Depends on: 764801
Depends on: 764803
tbpl seems to be working fine with Opera, closing.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Webtools → Tree Management
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: