Skip to content

Commit bf87586

Browse files
committed
Bug 1950211 - Add telemetry for String methods calling RegExp symbols on primitives r=dminor,iain
This patch adds telemetry for tc39/ecma262#3009. That normative PR has already been approved by TC39, but we need to verify that it's web compatible. Differential Revision: https://phabricator.services.mozilla.com/D241305 UltraBlame original commit: 6ea635bde2b623ac6352c27b65d5afb58d17fde4
1 parent 9716808 commit bf87586

File tree

7 files changed

+1117
-3
lines changed

7 files changed

+1117
-3
lines changed

dom/base/UseCounters.conf

+24
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,30 @@ used
756756
implementation
757757
defined
758758
behaviour
759+
custom
760+
JS_regexp_symbol_protocol_on_primitive
761+
passed
762+
a
763+
primitive
764+
with
765+
a
766+
custom
767+
implementation
768+
of
769+
the
770+
regexp
771+
protocol
772+
symbols
773+
to
774+
one
775+
of
776+
the
777+
String
778+
methods
779+
that
780+
accept
781+
a
782+
regexp
759783
/
760784
/
761785
Console

dom/base/use_counter_metrics.yaml

+221-3
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ counters
812812
#
813813
Total
814814
of
815-
2395
815+
2397
816816
use
817817
counter
818818
metrics
@@ -824,7 +824,7 @@ denominators
824824
#
825825
Total
826826
of
827-
357
827+
358
828828
'
829829
page
830830
'
@@ -4675,6 +4675,115 @@ send_in_pings
46754675
use
46764676
-
46774677
counters
4678+
js_regexp_symbol_protocol_on_primitive
4679+
:
4680+
type
4681+
:
4682+
counter
4683+
description
4684+
:
4685+
>
4686+
Whether
4687+
a
4688+
page
4689+
passed
4690+
a
4691+
primitive
4692+
with
4693+
a
4694+
custom
4695+
implementation
4696+
of
4697+
the
4698+
regexp
4699+
protocol
4700+
symbols
4701+
to
4702+
one
4703+
of
4704+
the
4705+
String
4706+
methods
4707+
that
4708+
accept
4709+
a
4710+
regexp
4711+
.
4712+
Compare
4713+
against
4714+
use
4715+
.
4716+
counter
4717+
.
4718+
top_level_content_documents_destroyed
4719+
to
4720+
calculate
4721+
the
4722+
rate
4723+
.
4724+
bugs
4725+
:
4726+
-
4727+
https
4728+
:
4729+
/
4730+
/
4731+
bugzilla
4732+
.
4733+
mozilla
4734+
.
4735+
org
4736+
/
4737+
show_bug
4738+
.
4739+
cgi
4740+
?
4741+
id
4742+
=
4743+
1852098
4744+
data_reviews
4745+
:
4746+
-
4747+
https
4748+
:
4749+
/
4750+
/
4751+
bugzilla
4752+
.
4753+
mozilla
4754+
.
4755+
org
4756+
/
4757+
show_bug
4758+
.
4759+
cgi
4760+
?
4761+
id
4762+
=
4763+
1852098
4764+
notification_emails
4765+
:
4766+
-
4767+
dom
4768+
-
4769+
core
4770+
mozilla
4771+
.
4772+
com
4773+
-
4774+
emilio
4775+
mozilla
4776+
.
4777+
com
4778+
expires
4779+
:
4780+
never
4781+
send_in_pings
4782+
:
4783+
-
4784+
use
4785+
-
4786+
counters
46784787
console_assert
46794788
:
46804789
type
@@ -33944,7 +34053,7 @@ counters
3394434053
#
3394534054
Total
3394634055
of
33947-
357
34056+
358
3394834057
'
3394934058
document
3395034059
'
@@ -37795,6 +37904,115 @@ send_in_pings
3779537904
use
3779637905
-
3779737906
counters
37907+
js_regexp_symbol_protocol_on_primitive
37908+
:
37909+
type
37910+
:
37911+
counter
37912+
description
37913+
:
37914+
>
37915+
Whether
37916+
a
37917+
document
37918+
passed
37919+
a
37920+
primitive
37921+
with
37922+
a
37923+
custom
37924+
implementation
37925+
of
37926+
the
37927+
regexp
37928+
protocol
37929+
symbols
37930+
to
37931+
one
37932+
of
37933+
the
37934+
String
37935+
methods
37936+
that
37937+
accept
37938+
a
37939+
regexp
37940+
.
37941+
Compare
37942+
against
37943+
use
37944+
.
37945+
counter
37946+
.
37947+
content_documents_destroyed
37948+
to
37949+
calculate
37950+
the
37951+
rate
37952+
.
37953+
bugs
37954+
:
37955+
-
37956+
https
37957+
:
37958+
/
37959+
/
37960+
bugzilla
37961+
.
37962+
mozilla
37963+
.
37964+
org
37965+
/
37966+
show_bug
37967+
.
37968+
cgi
37969+
?
37970+
id
37971+
=
37972+
1852098
37973+
data_reviews
37974+
:
37975+
-
37976+
https
37977+
:
37978+
/
37979+
/
37980+
bugzilla
37981+
.
37982+
mozilla
37983+
.
37984+
org
37985+
/
37986+
show_bug
37987+
.
37988+
cgi
37989+
?
37990+
id
37991+
=
37992+
1852098
37993+
notification_emails
37994+
:
37995+
-
37996+
dom
37997+
-
37998+
core
37999+
mozilla
38000+
.
38001+
com
38002+
-
38003+
emilio
38004+
mozilla
38005+
.
38006+
com
38007+
expires
38008+
:
38009+
never
38010+
send_in_pings
38011+
:
38012+
-
38013+
use
38014+
-
38015+
counters
3779838016
console_assert
3779938017
:
3780038018
type

js/public/friend/UsageStatistics.h

+6
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,12 @@ _
754754
OPTIMIZE_PROMISE_LOOKUP_FUSE
755755
OptimizePromiseLookupFuse
756756
)
757+
\
758+
_
759+
(
760+
REGEXP_SYMBOL_PROTOCOL_ON_PRIMITIVE
761+
RegExpSymbolProtocolOnPrimitive
762+
)
757763
/
758764
*
759765
*

0 commit comments

Comments
 (0)