gecko-dev/dom
Kyle Huey 1ab13f2322 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 Bug 1222478 - Enable more mulet tests. r=gerard-majax 2015-11-06 20:01:45 +01:00
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 Bug 1226479. Change ErrorResult::ThrowTypeError/ThrowRangeError to take string references, not pointers. r=mccr8 2015-11-20 13:36:46 -05:00
asmjscache Bug 961049 - Part 5: QuotaManager on PBackground asmjscache changes; r=luke 2015-11-22 10:44:06 +01:00
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 Bug 1226291 - Add SpecialPowers API for importing a jsm into the main process. r=jmaher 2015-11-25 12:34:08 -08:00
crypto bug 1234417 - fix a leak in CreateECPublicKey r=rbarnes 2015-12-21 17:14:41 -08:00
datastore Bug 1222478 - Enable more mulet tests. r=gerard-majax 2015-11-06 20:01:45 +01:00
devicestorage Bug 1232506: Make dom/devicestorage really work with e10s. r=alchen 2015-12-18 17:17:46 -08:00
downloads Bug 1229241 - Redirect EXTRA{_PP}_COMPONENTS to FINAL_TARGET{,_PP}_FILES.components. r=gps 2015-12-01 13:57:52 +09:00
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 Bug 1216687: Add nsILoadInfo flags for cookie policies. r=ckerschb 2015-12-06 18:33:15 -05:00
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 Bug 1228707. Add a away to call Web IDL callbacks while ignoring any errors from them, and use it in a few places. r=smaug 2015-11-30 22:04:09 -05:00
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 Bug 1217307 - Remove some unnecessary null checks in rest of dom/. r=njn 2015-11-19 09:13:49 +02:00
jsurl Bug 1217307 - Remove some unnecessary null checks in rest of dom/. r=njn 2015-11-19 09:13:49 +02:00
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 Bug 1210302 - Part 4: Add automated tests; r=sicking 2015-11-20 16:32:53 -05:00
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 Bug 1222478 - Enable more mulet tests. r=gerard-majax 2015-11-06 20:01:45 +01:00
mobileconnection Bug 1234746 - Disable test_mobile_operator_names_plmnlist.js. r=me 2015-12-23 11:37:47 +08:00
mobileid
mobilemessage Bug 1231100 - Get rid of nsIDOMFileReader - patch 2, r=sicking 2015-12-09 15:52:38 -05:00
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 Bug 1221104 - Throw NS_ERROR_NOT_IMPLEMENTED instead of NS_ERROR_UNEXPECTED for PushPermissionDescriptor.userVisible. r=baku 2015-12-18 15:02:50 +02:00
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 Bug 1230704. Change AbortablePromise::DoAbort to not worry about the result of calling its callback. r=smaug 2015-12-07 18:41:41 -05:00
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 Bug 1226708 - part 1 - Use importInMainProcess in requestsync tests. r=baku 2015-11-23 11:44:00 +01:00
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 Back out 350ecdaedef8 (bug 1223781) for test_killswitch_gonk.js permaorange 2015-11-27 20:01:32 -08:00
simplepush Bug 1235050 - Add basic SimplePush testing. r=kitcambridge 2015-12-28 17:23:00 +01:00
smil Bug 1224061: Make Event::InitEvent infallible. r=smaug 2015-11-13 08:09:42 +08:00
speakermanager Bug 1223734 - AudioChannelService should not be re-initialized after the XPCOM shutdown, r=smaug 2015-11-16 17:34:52 +00:00
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 Bug 1223702 - Fix some errors about wifi direct. r=hchang 2015-11-11 01:28:00 +01:00
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 Bug 1217307 - Remove some unnecessary null checks in rest of dom/. r=njn 2015-11-19 09:13:49 +02:00
xml Bug 1230092. Make nsIDOMCustomEvent no longer inherit from nsIDOMEvent, so that CustomEvent doesn't end up with multiple inheritance from nsIDOMEvent. r=smaug 2015-12-04 09:51:04 -05:00
xslt More test bustage from bug 1222624 2015-12-05 00:42:48 -08:00
xul Bug 1155328. r=smaug 2016-01-06 13:18:29 -08:00
jar.mn
moz.build