Closed Bug 977053 Opened 11 years ago Closed 7 years ago

test_pref_interval.js relies on that nsITimer is used only on the main thread

Categories

(Toolkit :: Places, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: michal, Assigned: mak)

References

Details

nsITimer can be used off the main thread and we do it in the new network cache. This test registers its own JS implementation of timer which causes a crash in our code. See bug #968101 comment 8.
The test has been disabled by bug #968101.
Michal, I think the solution is to use CID to get the timer in our code and not the ContractID.
this xpcshell test doesn't need the cache (well I suppose most of them don't), couldn't we simply disable the cache for this specific test? does the timer run regardless? Btw, if you want to use the CID to avoid possible issues with add-ons replacing nsITimer, you can do that, though I don't think you should just for this single case. Indeed this test is enough of a hack, I should rather rewrite it to not need to mock nsITimer (the component may fire a notification when the internal timer changes and the test could observe that).
Depends on: 1272679
No longer depends on: 1272679
Depends on: 1275878
Priority: -- → P3
This has been fixed in the meanwhile, the test got rewritten in bug 889561.
Assignee: nobody → mak77
Status: NEW → RESOLVED
Closed: 7 years ago
Depends on: 889561
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.