Commit Graph

113 Commits

Author SHA1 Message Date
Cosmin Sabou
67cc836522 Merge mozilla-central to mozilla-inbound. a=merge 2019-02-06 01:11:33 +02:00
Randell Jesup
ec594f87db Bug 1525337: add firing order assertions for setTimeout/setInterval r=smaug 2019-02-05 18:00:24 -05:00
Sylvestre Ledru
14486004b6 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D18488

--HG--
extra : moz-landing-system : lando
2019-02-04 19:10:18 +00:00
Randell Jesup
0df3232aca Bug 1523333: add setTimeout/Interval profiler markers for all uses r=mstange 2019-01-28 23:52:35 -05:00
Randell Jesup
e213c06fe8 Bug 1270059: Defer setTimeout/Intervals()s in content during pageload r=smaug
They will run off the new DeferredTimers idle queue if idle time is available
2019-01-26 12:18:06 -05:00
Emilio Cobos Álvarez
d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Andrea Marchesini
9cc643f6d3 Bug 1513895 - Unify PopupBlocker algorithm in 1 single file, r=smaug 2018-12-16 10:21:16 +01:00
Andrea Marchesini
cdd5a7b12c Bug 1511436 - Cleanup URL-Classifier code - part 0 - use of StaticPrefs, r=dimi 2018-12-14 12:40:16 +01:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andreas Farre
9345293ba7 Bug 1501138 - Make sure that timeout iterator advances. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D11327

--HG--
extra : moz-landing-system : lando
2018-11-08 17:10:59 +00:00
Andreas Farre
c9272ef398 Bug 1437064 - Remove tracking timeouts list from TimeoutManager. r=chutten,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D7878

--HG--
extra : moz-landing-system : lando
2018-10-12 18:01:19 +00:00
Tarek Ziadé
f059140c0d 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

--HG--
extra : rebase_source : 66b3f6f1f47bc167da350d52ae87d3c0061a8b25
2018-08-13 17:09:56 +02:00
Ben Kelly
852bbba6c0 Bug 1450266 P3 Remove nsGlobalWindowInner::InnerObjectsFreed() in favor of IsDying(). r=smaug 2018-04-03 17:10:16 -07:00
Miko Mynttinen
65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Andreas Pehrson
99ea5bdb99 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

--HG--
extra : rebase_source : a44dbea82106afd4c4677994075e6daa58fe4c1c
2017-12-06 12:56:32 +01:00
Nika Layzell
f1ac9bf744 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
920ec9caac Bug 1419144 - Part 15: Move PopupControlState into nsContentUtils, r=smaug
MozReview-Commit-ID: Kt2moF5nsDg
2017-11-23 13:11:34 -05:00
Nika Layzell
3409141758 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
60d080b412 Bug 1404198: Part 2i - Switch to NS_NewTimer* in dom. r=njn
MozReview-Commit-ID: 8Oei6TuXNbu

--HG--
extra : rebase_source : 31c583c699790cbcf302064146d313ee8126ef0c
2017-10-15 23:15:40 -07:00
Andreas Farre
2e8f0b10d0 Bug 1403586 - Don't disble budget throttling due to gUM. r=smaug,padenot 2017-09-29 15:21:45 +02:00
Andreas Farre
2a3cdfc4f6 Bug 1393359 - Register active user media on top level window. r=smaug,jib 2017-09-04 14:40:30 +02:00
Andreas Farre
dc0ff1e255 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
4409a06dbb 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
c38df01a71 Bug 1391602 - Clamp execution budget to a minimum value. r=bkelly 2017-08-24 10:35:45 +02:00
Henri Sivonen
29fb7aad8e Bug 1378123 - Make inner window track whether there is an active PeerConnection. r=jib
MozReview-Commit-ID: 98Hwhnxtt1T

--HG--
extra : rebase_source : 3d7be906acec0d4262fae15d1755cdb7cfc71eb3
2017-08-04 13:28:15 +03:00
Kestrel
91cfa95229 Bug 918780 - Add new PopupControlState for permitting file/color picker popup regardless of dom_allowed_events. r=smaug
MozReview-Commit-ID: 1GbjQ6IkMsv

--HG--
extra : rebase_source : 4ea11b78007d9ab67a932536843b3e12175732b3
2016-04-24 04:49:00 +01:00
Andreas Farre
8378e81e6d Bug 1385238 - Reset execution budget when background state changes. r=bkelly 2017-07-28 09:31:00 -04:00
Bevis Tseng
95b18d794e Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm
--HG--
extra : rebase_source : 84de1abfcc30a6964144c2e6718a508c71027b65
2017-07-27 02:18:20 +08:00
Andreas Farre
4a297f87de 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
0f4742a9bb Bug 1384037 - Label ThrottleTimeoutsCallback. r=billm
--HG--
extra : rebase_source : b6b5f38b4842b88f6c8d14fe99d762c3483306a0
2017-07-25 18:04:58 +08:00
Ben Kelly
08d429854a Bug 1378586 P5 Don't force setInterval() to a min 1ms delay. r=farre 2017-07-25 08:35:12 -07:00
Ben Kelly
90ef714043 Bug 1378586 P4 Clamp setInterval() based on nesting value instead of always. r=farre 2017-07-25 08:35:12 -07:00
Ben Kelly
50ec1a5f3e 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
910b4f672b Bug 1378586 P1 Track the nesting level on interval Timeout objects. r=farre 2017-07-25 08:35:12 -07:00
Ben Kelly
fd76c2a146 Bug 1378394 P1 Calculate next setInterval() time from start of previous callback. r=farre 2017-07-06 07:01:40 -07:00
Andreas Farre
132ec026c3 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
8878d13ff4 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
97fadb7f9e Bug 1373536 - Clean up static API of TimeoutBudgetManager. r=smaug
--HG--
extra : rebase_source : aaaf54c48d480473569bdc87c58bd1c1d88966fc
2017-06-19 10:11:47 +02:00
Andreas Farre
8d5f7ca0b5 Bug 1373536 - Move TimeoutBudgetManager to its own file. r=bkelly
--HG--
extra : rebase_source : bde692176b4cf01dd6d6aaf167a91acf6c92e504
2017-06-16 09:17:09 +02:00
Andreas Farre
4b620e2aca 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.

--HG--
extra : rebase_source : c7aba3d039116ed10597e7b58e2c6e7911cb493d
2017-05-30 13:08:11 +02:00
Sebastian Hengst
f38c7cdfa2 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
d569b67fe6 Backed out changeset 5bde0b2dd768 (bug 1373536) 2017-06-20 17:46:22 +02:00
Sebastian Hengst
9e2c8a5ab0 Backed out changeset d377000dbcc9 (bug 1373536) 2017-06-20 17:46:18 +02:00
Andreas Farre
7525173e5b Bug 1373536 - Clean up static API of TimeoutBudgetManager. r=smaug 2017-06-20 00:40:00 +02:00
Andreas Farre
3739a32604 Bug 1373536 - Move TimeoutBudgetManager to its own file. r=bkelly 2017-06-19 01:18:00 +02:00
Andreas Farre
094c0d5ecd 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
4deac3f186 Bug 1371787 P8 Change Timeout::mInterval member to a TimeDuration. r=ehsan 2017-06-15 17:30:48 -07:00
Ben Kelly
310e665654 Bug 1371787 P7 Make CalculateDelay() return a TimeDuration. r=ehsan 2017-06-15 17:30:48 -07:00
Ben Kelly
36211ea11b 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
a0d3a469e4 Bug 1371787 P5 Move the Timeout conditional checking into DOMMinTimeoutValue(). r=ehsan 2017-06-15 17:30:47 -07:00