gecko/dom
Kyle Huey a75769b18a Bug 1059469: Part 2 - When rescheduling the interval timer, cancel it first, and refactor things so that actually does something. r=bent
RunExpiredTimeouts has "fudging" code to always ensure that we execute at least one timeout.  This is intended to cover cases where an nsITimer fires slightly early, but it means we must be careful not to fire a timer more times than we intend to or we'll execute a timeout prematurely.

Consider a sequences of setTimeout calls alternating in delay between 0ms and 1000ms.  When the 1000ms timeout fires, it schedules a 0ms timeout.  The setTimeout call itself calls RescheduleTimeoutTimer, which schedules the timer for a 0 ms delay.  And once we unwind the 1000ms timeout RunExpiredTimeouts will also schedule the timer for a 0 ms delay.  If the timer has fired (remember, it's processed on a completely different thread) in the meantime, we ultimately will get two callbacks from nsITimer for our 0 ms timeout.  The first will run the 0 ms timeout and schedule a 1000 ms timeout, and the second will run the 1000 ms timeout (remember, RunExpiredTimeouts always runs at least one timeout!) ~999 ms ahead of schedule.

The solution is to cancel the timer in RescheduleTimeoutTimer, so that when we call it the second time it will cause any pending events from the first scheduling to be canceled.  But this actually doesn't work at all, because of how we use nsITimer.  Before worker threads were capable of accepting arbitrary runnables we created TimerThreadEventTarget, which translates the timer firing to the special worker event queue when the timer thread attempts to *dispatch* a runnable to the worker.  We still need this for some of the other types of timers (which use control runnables that interrupt JS, and not the regular event queue).  But setTimeout can simply run like a normal nsITimer callback now.  We need that here, or calling nsITimer::Cancel won't actually do anything, because the timer's event was ignored and TimerThreadEventTarget created its own event.
2016-01-06 13:18:29 -08:00
..
activities
alarm
animation Bug 1232563 part 4 - Don't perform style updates when the effect progress has not changed; r=heycam 2016-01-06 11:04:06 +09:00
apps Bug 1224703 - part 2: Enable tests on emulator r=billm 2016-01-05 15:37:06 -08:00
archivereader
asmjscache
audiochannel Backed out changesets 961f205d340d, 14a4637e9d96 and 14a4637e9d96 (bug 1228564) for failing Android M(4) test_browserElement_inproc_AudioChannel.html. r=backout 2015-12-27 22:28:08 +01:00
base Bug 1059469: Part 1 - Add a log module for dump() calls. r=bent 2016-01-06 13:18:29 -08:00
battery
bindings Backout 7621c3ea95cb11e1c376a9f705accc0f90057c0a (bug 1235923) for build bustage on a CLOSED TREE. 2016-01-06 12:05:06 -08:00
bluetooth Bug 1223722: Transfer arrays of Bluetooth UUIDs in |BluetoothValue|, r=brsun 2016-01-05 12:01:33 +01:00
broadcastchannel
browser-element merge mozilla-inbound to mozilla-central a=merge 2016-01-05 11:58:56 +01:00
cache Bug 1232780 - Disable mochitests which fail on e10s so we can get that suite running, a=test-only 2016-01-05 12:02:47 -08:00
camera Backed out changesets 961f205d340d, 14a4637e9d96 and 14a4637e9d96 (bug 1228564) for failing Android M(4) test_browserElement_inproc_AudioChannel.html. r=backout 2015-12-27 22:28:08 +01:00
canvas Bug 1237158 Unregister service worker at end of test_offscreen_serviceworker.html. r=ehsan 2016-01-06 08:56:16 -08:00
cellbroadcast Bug 1235110 - Part 2: Add Test Coverage. r=echen 2015-12-30 16:22:21 +08:00
contacts
crypto bug 1234417 - fix a leak in CreateECPublicKey r=rbarnes 2015-12-21 17:14:41 -08:00
datastore
devicestorage Bug 1232506: Make dom/devicestorage really work with e10s. r=alchen 2015-12-18 17:17:46 -08:00
downloads
encoding Bug 1236227, don't OOM in TextDecoder, r=baku 2016-01-05 15:48:47 +02:00
engineeringmode
events Bug 1153636: Don't assert with addEventListener("") on workers. r=smaug 2016-01-06 13:18:29 -08:00
fetch
filehandle
filesystem Back out 2 changesets (bug 1234192) for "Assertion failure: !mFileSystem" in test_fs_createFile.html 2015-12-29 19:16:40 -08:00
fmradio Backed out changesets 961f205d340d, 14a4637e9d96 and 14a4637e9d96 (bug 1228564) for failing Android M(4) test_browserElement_inproc_AudioChannel.html. r=backout 2015-12-27 22:28:08 +01:00
gamepad
geolocation
html Bug 1232852 (part 5) - Remove some unused parameters in and around layout/base/. r=heycam. 2016-01-05 16:08:17 -08:00
icc
identity
imptests Backed out changeset 3aca7055f52f (bug 1236329) because something from this push turned browser_video_test.js permafail on mulet CLOSED TREE 2016-01-05 15:14:48 -08:00
indexedDB Bug 1236632 - remove unused variable in FactoryOp::WaitForTransactions; r=janv 2016-01-04 14:29:33 -05:00
inputmethod Bug 1234459 - Expose full text in the input box to InputMethod API, r=masayuki, sr=smaug 2016-01-05 00:37:00 +01:00
inputport
interfaces Merge mozilla-central to fx-team 2015-12-15 14:54:46 +01:00
ipc Merge fx-team to m-c a=merge CLOSED TREE 2016-01-05 16:34:06 -08:00
json
jsurl
locales Bug 1235212 - [css-grid] Use Unicode ellipsis in error messages. r=francesco.lodolo@gmail.com 2016-01-05 21:27:13 +01:00
manifest
mathml
media Bug 1236380 - GMPStorage::mShutdown=true until Init() succeeds - r=cpearce 2016-01-07 08:06:47 +11:00
messagechannel Bug 1232291 - Non-used header in MessagePortService.*, r=smaug 2015-12-14 14:36:17 +00:00
messages
mobileconnection Bug 1234746 - Disable test_mobile_operator_names_plmnlist.js. r=me 2015-12-23 11:37:47 +08:00
mobileid
mobilemessage
network Bug 1226200: Don't assume a TCPSocket has only one managee (and rename LoneManagedOrNull) r=jdm 2015-12-22 10:14:23 -05:00
newapps
nfc Bug 1216407 - Use mozilla/Endian.h for NfcService. r=yoshi 2015-12-22 00:04:00 +01:00
notification Bug 1227300, Part 6 - Use showAlert to display web notifications. r=wchen 2015-12-03 08:27:25 -08:00
offline
payment
permission
phonenumberutils
plugins Backout 7621c3ea95cb11e1c376a9f705accc0f90057c0a (bug 1235923) for build bustage on a CLOSED TREE. 2016-01-06 12:05:06 -08:00
power
presentation Bug 1224113 - fix ref count issue during channel close. r=jdm 2015-12-22 19:30:08 +08:00
promise
push Bug 1189998, Part 4 - Add authentication secret to Push data test. r=dragana 2015-12-11 11:16:46 -05:00
quota Bug 1209349 - Audit the callers of the two-argument OriginAttributes. r=janv 2015-12-17 15:41:16 +08:00
requestsync
res
resourcestats
secureelement
security Bug 1030936 - [CSP] remove fast-path for certified apps once the C++ backend is activated. r=ckerschb 2015-12-17 12:07:37 +08:00
settings
simplepush Bug 1235050 - Add basic SimplePush testing. r=kitcambridge 2015-12-28 17:23:00 +01:00
smil
speakermanager
storage Bug 1165214 - Use OriginAttributes in DOM Storage. r=smaug, r=bholley 2016-01-05 07:25:00 -05:00
svg Bug 1145195 part 2 - SVGFragmentIdentifier::ProcessSVGViewSpec() shouldn't actually let #svgView() affect attribute values r=dholbert 2015-12-14 00:58:01 +00:00
system Bug 1235697 - Part 2: Add Test Coverage. r=echen 2015-12-30 18:02:27 +08:00
telephony Bug 975778 - Increase the timeout value for test_cdma_call_waiting.js; r=me 2015-12-31 11:47:39 +08:00
tests Bug 1180351 - Followup: Disable pointerlock tests on Windows for frequently failing tests. r=turning off tests 2015-12-31 14:47:55 +01:00
tethering
time
tv Bug 1200133 - Part1 - Change mochitest using TV Simulator Service. r=seanlin 2015-12-17 15:41:00 +01:00
voicemail
vr
wappush
webidl Bug 1235657 - Session storage needs to handle origin attributes correctly - part 1 - createOriginAttributesWithUserContextId, r=huseby 2016-01-06 10:08:30 +00:00
wifi
workers Bug 1059469: Part 2 - When rescheduling the interval timer, cancel it first, and refactor things so that actually does something. r=bent 2016-01-06 13:18:29 -08:00
xbl
xml
xslt
xul Bug 1155328. r=smaug 2016-01-06 13:18:29 -08:00
jar.mn
moz.build