Simon Giesecke
b9621d6376
Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
...
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +00:00
Simon Giesecke
ad01a10a3b
Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
...
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.
Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Simon Giesecke
71a9cb53f9
Bug 1696355 - Remove redundant nullptr checks of return value of infallible new in toolkit/components/telemetry. r=chutten
...
Depends on D107185
Differential Revision: https://phabricator.services.mozilla.com/D107186
2021-03-05 08:36:59 +00:00
Simon Giesecke
c5bdcb69d1
Bug 1695162 - Make nsBaseHashtable::ConstIter return a real ConstIterator. r=xpcom-reviewers,necko-reviewers,nika
...
Differential Revision: https://phabricator.services.mozilla.com/D106642
2021-03-03 08:58:53 +00:00
Simon Giesecke
0b443059fd
Bug 1693306 - Simplify some uses of LookupOrInsertWith by GetOrInsertNew. r=xpcom-reviewers,necko-reviewers,dragana,nika
...
Differential Revision: https://phabricator.services.mozilla.com/D105479
2021-02-26 09:22:54 +00:00
Simon Giesecke
9af107a839
Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
...
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.
Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke
4f75368dcb
Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
...
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).
Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00
Simon Giesecke
661e25bf09
Bug 1692880 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
...
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-16 15:53:33 +00:00
Simon Giesecke
780a1636a9
Bug 1691894 - Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi
...
Differential Revision: https://phabricator.services.mozilla.com/D104849
2021-02-15 15:12:17 +00:00
smolnar
1afbbe67e1
Backed out 5 changesets (bug 1691894) for causing hazard failures in nsXULPrototypeCache. CLOSED TREE
...
Backed out changeset 22dc870ee609 (bug 1691894)
Backed out changeset 58c31e9d6ae3 (bug 1691894)
Backed out changeset 7483e84149d8 (bug 1691894)
Backed out changeset f977d6cfa973 (bug 1691894)
Backed out changeset db4503476f34 (bug 1691894)
2021-02-15 16:43:23 +02:00
Simon Giesecke
3c29a68440
Bug 1691894 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
...
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-15 10:04:46 +00:00
Simon Giesecke
8973094ec1
Bug 1691894 - Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi
...
Differential Revision: https://phabricator.services.mozilla.com/D104849
2021-02-15 10:04:45 +00:00
Chris H-C
1c99940712
Bug 1676404 - Remove event summary max keys pref r=janerik
...
It can't be accessed off-main-thread and hasn't been changed in 2 years.
Differential Revision: https://phabricator.services.mozilla.com/D96595
2020-11-10 17:13:20 +00:00
Chris H-C
f66c60b7e9
Bug 1664799 - Don't hold the Scalar lock while calling IPC r=janerik
...
Differential Revision: https://phabricator.services.mozilla.com/D90276
2020-09-17 07:14:08 +00:00
Gerald Squelart
782cf5d3ad
Bug 1657033 - Use Span<const char> in JSONWriter - r=froydnj
...
In most situations, JSONWriter users already know string lengths (either directly, or through `nsCString` and friends), so we should keep this information through JSONWriter and not recompute it again.
This also allows using JSONWriter with sub-strings (e.g., from a bigger buffer), without having to create null-terminated strings.
Public JSONWriter functions have overloads that accept literal strings.
Differential Revision: https://phabricator.services.mozilla.com/D86192
2020-09-14 02:33:20 +00:00
Simon Giesecke
cd8b8939b9
Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Simon Giesecke
e3a88d2d40
Bug 1626570 - Improve handling of copying arrays in toolkit/components/telemetry/. r=chutten
...
Differential Revision: https://phabricator.services.mozilla.com/D72327
2020-04-30 09:39:56 +00:00
Chris Fronk
d5b004443b
Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D64511
--HG--
rename : mfbt/Pair.h => mfbt/CompactPair.h
extra : moz-landing-system : lando
2020-03-17 12:42:12 +00:00
shindli
b02b3a6e1a
Backed out changeset a08637fb30c8 (bug 1143478) for causing bustages in /builds/worker/checkouts/gecko/ipc/mscom/Registration.cpp CLOSED TREE
...
--HG--
rename : mfbt/CompactPair.h => mfbt/Pair.h
2020-03-11 14:30:54 +02:00
Chris Fronk
a27e438c2d
Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D64511
--HG--
rename : mfbt/Pair.h => mfbt/CompactPair.h
extra : moz-landing-system : lando
2020-03-11 12:18:13 +00:00
Andrew McCreight
4babb2b5ab
Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
...
Patch by bhackett and jlaster. Also reviewed by mccr8.
Differential Revision: https://phabricator.services.mozilla.com/D60197
--HG--
extra : moz-landing-system : lando
2020-02-27 17:39:15 +00:00
Ciure Andrei
00dd87f6f4
Backed out changeset d407a28318e6 (bug 1609815) for causing windows ming bustages CLOSED TREE
...
--HG--
extra : histedit_source : b2c748e31e0f6ba8fcf9960a336e0bbd361b07e6
2020-02-27 07:05:19 +02:00
Andrew McCreight
b197e1f783
Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
...
Patch by bhackett and jlaster. Also reviewed by mccr8.
Differential Revision: https://phabricator.services.mozilla.com/D60197
--HG--
extra : moz-landing-system : lando
2020-02-27 04:43:48 +00:00
Simon Giesecke
b50347f917
Bug 1611415 - Prefer using std::move over forget. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D60980
--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli
91aa0518dd
Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE
2020-02-12 20:13:29 +02:00
Simon Giesecke
f604a47fa5
Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D60980
--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Eric Rahm
78ee6675cf
Bug 1606187 - Part 2b: Update users of nsClassHashtable to handle UniquePtr differences r=KrisWright,froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D59042
--HG--
extra : moz-landing-system : lando
2020-01-13 19:18:56 +00:00
Jeff Walden
62a130ba0a
Bug 1602882 - Move array operations to a new js/Array.h header. r=sfink,bzbarsky
...
Differential Revision: https://phabricator.services.mozilla.com/D56595
--HG--
extra : moz-landing-system : lando
2019-12-11 06:17:44 +00:00
Beatriz Rizental
aec25a0554
Bug 1365529 Allow restricting scalar keys to a known set in Scalars.yaml r=chutten
...
Differential Revision: https://phabricator.services.mozilla.com/D51629
--HG--
extra : moz-landing-system : lando
2019-11-28 10:19:25 +00:00
Simon Giesecke
a7b804f7af
Bug 1575479 - Encapsulate mBaseHashtableET::mData. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D45004
--HG--
extra : moz-landing-system : lando
2019-09-10 13:51:09 +00:00
Coroiu Cristina
77681b7832
Backed out 2 changesets (bug 1575479) for build bustage at build/src/gfx/thebes/gfxFT2Fonts.h on a CLOSED TREE
...
Backed out changeset dcbc7c69fb64 (bug 1575479)
Backed out changeset 6d54a8115393 (bug 1575479)
2019-09-10 15:01:10 +03:00
Simon Giesecke
dda41fa097
Bug 1575479 - Encapsulate mBaseHashtableET::mData. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D45004
--HG--
extra : moz-landing-system : lando
2019-09-06 14:14:06 +00:00
Chris H-C
010d758500
Bug 1573477 - Geckoview Streaming Telemetry: Scalar part r=janerik,agi
...
Let's not update the "how to exfiltrate a probe in GeckoView" docs until the
GV and Glean parts are complete.
Differential Revision: https://phabricator.services.mozilla.com/D42208
--HG--
extra : moz-landing-system : lando
2019-08-27 12:36:40 +00:00
Nathan Froyd
3983c191ec
Bug 1575519 - use auto& in ranged-for loops to avoid copies; r=chutten
...
This style is used consistently throughout telemetry code, but was
missed in these places.
Differential Revision: https://phabricator.services.mozilla.com/D42830
--HG--
extra : moz-landing-system : lando
2019-08-21 12:35:16 +00:00
Jan-Erik Rediger
43e40a4856
Bug 1564628 - Remove expired highwatermark probe (GeckoView Telemetry buffering) r=chutten
...
Differential Revision: https://phabricator.services.mozilla.com/D37535
--HG--
extra : moz-landing-system : lando
2019-07-10 14:08:10 +00:00
dvictoriad
fe88991118
Bug 1556025 - Added comment to explain that we store the scalar name in KeyedScalars because references to BaseScalarInfo aren't guaranteed to be safe if they're DynamicScalarInfos. r=chutten@mozilla.com
...
Differential Revision: https://phabricator.services.mozilla.com/D34470
--HG--
extra : moz-landing-system : lando
2019-06-11 13:32:35 +00:00
Chris H-C
a14e007fbd
Bug 1555798 - Use a scalar name copy instead of a &BaseScalarInfo r=Dexter
...
References to ScalarInfo objects are stable for all scalars registered
at compile-time, but not for those registered at runtime.
Differential Revision: https://phabricator.services.mozilla.com/D33274
--HG--
extra : moz-landing-system : lando
2019-05-31 13:36:27 +00:00
Georg Fritzsche
4ba158ce96
Bug 1529696 - Rename DATASET_RELEASE_CHANNEL_OPTOUT/OPTIN to DATASET_ALL/PRERELEASE_CHANNELS in Telemetry code r=chutten
...
Differential Revision: https://phabricator.services.mozilla.com/D25934
--HG--
extra : moz-landing-system : lando
2019-04-03 16:30:00 +00:00
jlashton
c25998b4da
Bug 1513546 - Change error message for GetKeyedScalarByEnum lookup in ApplyKeyedScalarActions r=chutten
...
Differential Revision: https://phabricator.services.mozilla.com/D23818
--HG--
extra : moz-landing-system : lando
2019-03-18 15:25:51 +00:00
Chris H-C
fcae8c7f2b
Bug 1501659 - Ensure child processes know which dynamic scalars were built-in. r=janerik
...
Depends on D19836
Differential Revision: https://phabricator.services.mozilla.com/D19837
--HG--
extra : moz-landing-system : lando
2019-02-15 19:47:44 +00:00
Kaio Augusto de Camargo
18f2aa68a5
Bug 1513496 - Stop logging failure warnings if the scalar is expired. r=chutten
...
Currently, when operating with scalars, if a call to internal_GetScalarByEnum (or its keyed variant) return an error, then a warning will be logged. If one of the requested scalars is expired, this could lead to an unwated flood of logs. With this change, the return of the function is checked, and if it is NS_ERROR_NOT_AVAILABLE (i.e. expired scalar), then no warning is issued.
Differential Revision: https://phabricator.services.mozilla.com/D16392
--HG--
extra : moz-landing-system : lando
2019-01-14 18:33:13 +00:00
Jan-Erik Rediger
d914e97f8d
Bug 1498169 - Export all registered stores to JavaScript r=chutten
...
Differential Revision: https://phabricator.services.mozilla.com/D14576
--HG--
extra : moz-landing-system : lando
2018-12-18 14:55:30 +00: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
Ehsan Akhgari
490e611801
Bug 1508472 - Part 5: Fifth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
...
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal. I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.
Differential Revision: https://phabricator.services.mozilla.com/D13371
--HG--
extra : moz-landing-system : lando
2018-11-29 10:30:46 +00:00
Chris H-C
2f12fb7b34
bug 1505060 - Support multistore for dynamic scalars r=janerik
...
The storage approach for dynamic scalars uses nsAtom to ensure we don't
repeatedly store the same string over and over.
Differential Revision: https://phabricator.services.mozilla.com/D12788
--HG--
extra : moz-landing-system : lando
2018-11-27 17:48:46 +00:00
Chris H-C
b34692ea2e
bug 1498172 - Support Scalar Snapshotting from multiple stores r=janerik
...
And test it.
Paritcular annoying bits are that we now have to iterate over Scalar objects
that are -present- even if they don't have data for the store being snapshot.
To maintain our previous semantics about not having process entries in the
snapshot object when the process is null (and, similarly for keyed scalars), we
need to retcon out some things during the snapshotting process.
Differential Revision: https://phabricator.services.mozilla.com/D12545
--HG--
extra : moz-landing-system : lando
2018-11-22 14:55:36 +00:00
Chris H-C
10cf17d155
bug 1498165 - Support multistore in ScalarBoolean r=janerik
...
Depends on D12132
Differential Revision: https://phabricator.services.mozilla.com/D12125
--HG--
extra : moz-landing-system : lando
2018-11-20 19:58:07 +00:00
Chris H-C
ca0dd73d2c
bug 1498165 - Support multistore in ScalarString r=janerik
...
Depends on D12131
Differential Revision: https://phabricator.services.mozilla.com/D12132
--HG--
extra : moz-landing-system : lando
2018-11-20 19:58:04 +00:00
Chris H-C
b7658e7e9b
bug 1498165 - Plumb 'we wish to clear this' down to the storage layer r=janerik
...
Depends on D12130
Differential Revision: https://phabricator.services.mozilla.com/D12131
--HG--
extra : moz-landing-system : lando
2018-11-20 19:57:57 +00:00
Chris H-C
0a4ea1e384
bug 1498165 - Support multistore in ScalarUnsigned r=janerik
...
This one's a little trickier than the others because it has an implicit
default value of 0 for initial calls to AddValue and SetMaximum.
Depends on D12129
Differential Revision: https://phabricator.services.mozilla.com/D12130
--HG--
extra : moz-landing-system : lando
2018-11-20 19:57:55 +00:00