Commit Graph
104 Commits
Author SHA1 Message Date
Andreas Farre 2d48a03a87 Bug 1501138 - Make sure that timeout iterator advances. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D11327
2018-11-08 17:10:59 +00:00
Andreas Farre 7463bf2449 Bug 1437064 - Remove tracking timeouts list from TimeoutManager. r=chutten,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D7878
2018-10-12 18:01:19 +00:00
Tarek Ziadé 99d1f89d59 Bug 1477755 - Measure TimeoutManager execution - r=farre,froydnj
Tracks calls made through TimeoutManager and makes sure they are
accounted for in the corresponding DocGroup

MozReview-Commit-ID: IvcoBrrZVWp
2018-08-13 17:09:56 +02:00
Ben Kelly 6b24f05f06 Bug 1450266 P3 Remove nsGlobalWindowInner::InnerObjectsFreed() in favor of IsDying(). r=smaug 2018-04-03 17:10:16 -07:00
Miko Mynttinen 86800aa3f1 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz
2018-03-13 14:51:33 +01:00
Andreas Pehrson ade94aca5e Bug 1299515 - Include nsContentUtils in TimeoutManager. r=mystor
The build is failing without this. Assuming I did something in an earlier patch
that either removed an nsContentUtils include or changed the order so it's not
available here.

MozReview-Commit-ID: Lsm8yhRbtFC
2017-12-06 12:56:32 +01:00
Nika Layzell 20ee9a4927 Bug 1419597 - Part 18: Remove IsInnerWindow and IsOuterWindow methods, r=smaug
MozReview-Commit-ID: DAAm6tLubhJ
2017-11-23 13:12:13 -05:00
Nika Layzell c2a2aa6fc5 Bug 1419144 - Part 15: Move PopupControlState into nsContentUtils, r=smaug
MozReview-Commit-ID: Kt2moF5nsDg
2017-11-23 13:11:34 -05:00
Nika Layzell d8c117bc28 Bug 1414974 - Part 2: Switch many consumers to nsGlobalWindow{Inner,Outer}, r=smaug
This is a large patch which tries to switch many of the external consumers of
nsGlobalWindow to instead use the new Inner or Outer variants.

MozReview-Commit-ID: 99648Lm46T5
2017-11-09 10:44:47 -05:00
Kris Maglione 7cdbf75d48 Bug 1404198: Part 2i - Switch to NS_NewTimer* in dom. r=njn
MozReview-Commit-ID: 8Oei6TuXNbu
2017-10-15 23:15:40 -07:00
Andreas Farre c0153ce59d Bug 1403586 - Don't disble budget throttling due to gUM. r=smaug,padenot 2017-09-29 15:21:45 +02:00
Andreas Farre f912b82fb5 Bug 1393359 - Register active user media on top level window. r=smaug,jib 2017-09-04 14:40:30 +02:00
Andreas Farre 0478fbfcb2 Bug 1393056 - Make it possible to count open WebSockets on the main thread. r=smaug 2017-09-01 10:36:49 +02:00
Andreas Farre ccc9ffe1f1 Bug 1393764 - Reset execution budget if BudgetThrottlingEnabled returns false. r=bkelly
When BudgetThrottlingEnabled transitions from true to false, the
execution budget can be negative which will have the unfortunate
effect of limiting the number of timeouts run by
TimeoutManager::RunTimeout to zero. By resetting the execution budget
in UpdateBudget, when BudgetThrottlingEnabled returns false, we
prevent this loop from happening.
2017-08-29 16:44:24 +02:00
Andreas Farre c24a0f0e19 Bug 1391602 - Clamp execution budget to a minimum value. r=bkelly 2017-08-24 10:35:45 +02:00
Henri Sivonen e3e3eb5695 Bug 1378123 - Make inner window track whether there is an active PeerConnection. r=jib
MozReview-Commit-ID: 98Hwhnxtt1T
2017-08-04 13:28:15 +03:00
Kestrel cb30f12dc8 Bug 918780 - Add new PopupControlState for permitting file/color picker popup regardless of dom_allowed_events. r=smaug
MozReview-Commit-ID: 1GbjQ6IkMsv
2016-04-24 04:49:00 +01:00
Andreas Farre b5d4b07b1b Bug 1385238 - Reset execution budget when background state changes. r=bkelly 2017-07-28 09:31:00 -04:00
Bevis Tseng 59627df038 Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm 2017-07-27 02:18:20 +08:00
Andreas Farre 90477bf60f Bug 1382254 - Only disallow budget throttling. r=ehsan
Don't consider WebSockets, IndexedDB, etc when considering background
tabs for ordinary throttling since that makes us throttle way less
than we used to.
2017-07-26 13:37:08 +02:00
Bevis Tseng 85d5fa0e48 Bug 1384037 - Label ThrottleTimeoutsCallback. r=billm 2017-07-25 18:04:58 +08:00
Ben Kelly b00eac146d Bug 1378586 P5 Don't force setInterval() to a min 1ms delay. r=farre 2017-07-25 08:35:12 -07:00
Ben Kelly b237d4e7d9 Bug 1378586 P4 Clamp setInterval() based on nesting value instead of always. r=farre 2017-07-25 08:35:12 -07:00
Ben Kelly 8554a40e7c Bug 1378586 P2 Avoid Timeout mNestingLevel rollover by just limiting the value to the values we care about. r=farre 2017-07-25 08:35:12 -07:00
Ben Kelly 505bd948b7 Bug 1378586 P1 Track the nesting level on interval Timeout objects. r=farre 2017-07-25 08:35:12 -07:00
Ben Kelly d0441a47ea Bug 1378394 P1 Calculate next setInterval() time from start of previous callback. r=farre 2017-07-06 07:01:40 -07:00
Andreas Farre e8e3c685ac Bug 1362322 - Throttle background timeouts using budget. r=bkelly
Deduct timeout execution time from a continuously regenerating
execution budget. Then throttle timeouts by using that budget in
TimeoutManager::MinSchedulingDelay to adjust the minimum value if
the budget is negative. The minimum value is adjusted to be a
value where the budget would have regenerated to be +0 ms.

The execution budget is clamped by values in ms defined in prefs:

* dom.timeout.background_throttling_max_budget: 50
* dom.timeout.foreground_throttling_max_budget: -1

A value equal or less than 0 means that the budget is infinite.

The regeneration rate can be controlled by the following prefs:

* dom.timeout.background_budget_regeneration_rate
* dom.timeout.foreground_budget_regeneration_rate

one each for foreground and background throttling.

To not starve timeouts indefinitely we clamp the minimum delay using
the pref:

* dom.timeout.budget_throttling_max_delay: 15000

The feature is behind the pref:

* dom.timeout.enable_budget_timer_throttling
2017-07-02 18:02:38 +02:00
Ben Kelly 785a9817a4 Bug 1375287 Make TimeoutManager use a pref cache variable for dom.disable_open_click_delay. r=ehsan 2017-06-23 07:03:30 -07:00
Andreas Farre 7fba5882dd Bug 1373536 - Clean up static API of TimeoutBudgetManager. r=smaug 2017-06-19 10:11:47 +02:00
Andreas Farre 50c5a42af5 Bug 1373536 - Move TimeoutBudgetManager to its own file. r=bkelly 2017-06-16 09:17:09 +02:00
Andreas Farre eb63589149 Bug 1373536 - Unify execution measurements. r=bkelly
Expose the utility framework for computing runnable execution time for
telemetry to be able to use it for managing budget times.
2017-05-30 13:08:11 +02:00
Sebastian Hengst b879d28128 Backed out changeset 10676fd9e6ad (bug 1373536) for failing asan-fuzzing at dom/base/TimeoutHandler.h:26 with unknown type name 'NS_DECL_CYCLE_COLLECTION_CLASS' and more. r=backout 2017-06-20 17:47:54 +02:00
Sebastian Hengst f1aeafe17b Backed out changeset 5bde0b2dd768 (bug 1373536) 2017-06-20 17:46:22 +02:00
Sebastian Hengst 27a8e9ef06 Backed out changeset d377000dbcc9 (bug 1373536) 2017-06-20 17:46:18 +02:00
Andreas Farre 5a246772d0 Bug 1373536 - Clean up static API of TimeoutBudgetManager. r=smaug 2017-06-20 00:40:00 +02:00
Andreas Farre 8b8b571592 Bug 1373536 - Move TimeoutBudgetManager to its own file. r=bkelly 2017-06-19 01:18:00 +02:00
Andreas Farre d7e4c73d5f Bug 1373536 - Unify execution measurements. r=bkelly
Expose the utility framework for computing runnable execution time for
telemetry to be able to use it for managing budget times.
2017-06-16 07:40:00 +02:00
Ben Kelly b7abc9fed8 Bug 1371787 P8 Change Timeout::mInterval member to a TimeDuration. r=ehsan 2017-06-15 17:30:48 -07:00
Ben Kelly 13b51e0da8 Bug 1371787 P7 Make CalculateDelay() return a TimeDuration. r=ehsan 2017-06-15 17:30:48 -07:00
Ben Kelly a3a0824f2a Bug 1371787 P6 Move the std::max() calculation into DOMMinTimeoutValue() and rename the method to CalculateDelay(). r=ehsan 2017-06-15 17:30:47 -07:00
Ben Kelly 0b0cff3742 Bug 1371787 P5 Move the Timeout conditional checking into DOMMinTimeoutValue(). r=ehsan 2017-06-15 17:30:47 -07:00
Ben Kelly 0f8eebc74c Bug 1371787 P4 Pass Timeout to DOMMinTimeoutValue(). r=ehsan 2017-06-15 17:30:47 -07:00
Ben Kelly ff37f2bc4c Bug 1371787 P3 Move some Timeout initialization earlier. r=ehsan 2017-06-15 17:30:47 -07:00
Ben Kelly e92b8bfdb1 Bug 1371787 P2 Don't adjust Timeout::When() values in TimeoutManager::Resume(). r=ehsan 2017-06-15 17:30:47 -07:00
Ben Kelly 4a074d4186 Bug 1371787 P1 Rename TimeoutManager "min timeout" values to "min clamp timeout" for clarity. r=ehsan 2017-06-15 17:30:47 -07:00
Ben Kelly 7ad41638d7 Bug 1371664 P4 Remove old TimeoutManager code that adjusted Timeout::When() while in background. r=ehsan 2017-06-13 18:08:28 -07:00
Ben Kelly b1f901e58b Bug 1371664 P3 Pass a minimum delay to TimeoutExecutor::MaybeSchedule() based on TimeoutManager::IsBackground(). r=ehsan 2017-06-13 18:08:27 -07:00
Ben Kelly 25f85897ab Bug 1371664 P2 Make nsGlobalWindow::SetIsBackground() call new TimeoutManager::UpdateBackgroundState(). r=ehsan 2017-06-13 18:08:27 -07:00
Ben Kelly 79f927f616 Bug 1371020 P3 Cleanup some IsFrozen()/IsSuspended() checking in TimeoutManager. r=ehsan 2017-06-08 19:13:37 -07:00
Ben Kelly 1b3820e042 Bug 1371020 P2 Avoid scheduling TimeoutExecutor if the window becomes suspended in RunTimeout. r=ehsan 2017-06-08 19:13:37 -07:00