Re: [w3c/ServiceWorker] Add limits to the number of router rule registration (PR #1752)

@sisidovski commented on this pull request.



> +    <h3 id="count-router-inner-conditions"><dfn>Count Router Inner Conditions</dfn></h3>
+
+      : Input
+      :: |condition|, a {{RouterCondition}}
+      :: |result|, a [=count router condition result=]
+      :: |maxCount|, a number
+      :: |maxDepth|, a number
+      : Output
+      :: |result|, a [=count router condition result=]
+
+      1. Increment |result|'s [=count router condition result/total count=] by one.
+      1. If |result|'s [=count router condition result/total count=] exceeds |maxCount|, return |result|.
+      1. If |result|'s [=count router condition result/depth=] exceeds |maxDepth|, return |result|.
+      1. If |condition|["{{RouterCondition/_or}}"] [=map/exists=], then:
+          1. Increment |result|'s [=count router condition result/depth=] by one.
+          1. For each |orCondition| of |condition|["{{RouterCondition/_or}}"]:

I've updated to set |result| to be the result of count-router-inner-conditions directly, and now we don't have to set `total count` explicitly. Hence note is not required anymore. WDYT?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1752#discussion_r1941392835
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/pull/1752/review/2593228005@github.com>

Received on Tuesday, 4 February 2025 15:27:15 UTC