File tree 3 files changed +14
-3
lines changed
public/mojom/use_counter/metrics
renderer/modules/service_worker
3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -3792,6 +3792,8 @@ enum WebFeature {
3792
3792
kContentDispositionInSvgUse = 4451,
3793
3793
kSameDocumentCrossOriginInitiator = 4452,
3794
3794
kServiceWorkerFetchHandlerModifiedAfterInitialization = 4453,
3795
+ kServiceWorkerAddHandlerAfterInitialization = 4468,
3796
+ kServiceWorkerSetAttributeHandlerAfterInitialization = 4469,
3795
3797
3796
3798
// Add new features immediately above this line. Don't change assigned
3797
3799
// numbers of any item, and don't reuse removed slots.
Original file line number Diff line number Diff line change @@ -695,6 +695,8 @@ bool ServiceWorkerGlobalScope::AddEventListenerInternal(
695
695
this ,
696
696
WebFeature::kServiceWorkerFetchHandlerUpdateAfterInitialization );
697
697
}
698
+ UseCounter::Count (this ,
699
+ WebFeature::kServiceWorkerAddHandlerAfterInitialization );
698
700
}
699
701
return WorkerGlobalScope::AddEventListenerInternal (event_type, listener,
700
702
options);
@@ -2645,10 +2647,14 @@ bool ServiceWorkerGlobalScope::SetAttributeEventListener(
2645
2647
const AtomicString& event_type,
2646
2648
EventListener* listener) {
2647
2649
// Count the modification of fetch handlers after the initial evaluation.
2648
- if (did_evaluate_script_ && event_type == event_type_names::kFetch ) {
2650
+ if (did_evaluate_script_) {
2651
+ if (event_type == event_type_names::kFetch ) {
2652
+ UseCounter::Count (
2653
+ this ,
2654
+ WebFeature::kServiceWorkerFetchHandlerModifiedAfterInitialization );
2655
+ }
2649
2656
UseCounter::Count (
2650
- this ,
2651
- WebFeature::kServiceWorkerFetchHandlerModifiedAfterInitialization );
2657
+ this , WebFeature::kServiceWorkerSetAttributeHandlerAfterInitialization );
2652
2658
}
2653
2659
return WorkerGlobalScope::SetAttributeEventListener (event_type, listener);
2654
2660
}
Original file line number Diff line number Diff line change @@ -41969,6 +41969,9 @@ Called by update_use_counter_feature_enum.py.-->
41969
41969
<int value="4452" label="SameDocumentCrossOriginInitiator"/>
41970
41970
<int value="4453"
41971
41971
label="ServiceWorkerFetchHandlerModifiedAfterInitialization"/>
41972
+ <int value="4468" label="ServiceWorkerAddHandlerAfterInitialization"/>
41973
+ <int value="4469"
41974
+ label="ServiceWorkerSetAttributeHandlerAfterInitialization"/>
41972
41975
</enum>
41973
41976
41974
41977
<enum name="FeaturePolicyAllowlistType">
You can’t perform that action at this time.
0 commit comments