Skip to content

Commit 2c48c76

Browse files
[editorial] use network data's references (#1012)
* [editorial] use `network data`'s references And reverted renames from #1010
1 parent bf20c0b commit 2c48c76

File tree

1 file changed

+33
-32
lines changed

1 file changed

+33
-32
lines changed

index.bs

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6811,24 +6811,24 @@ A <dfn>network data</dfn> is a [=/struct=] with:
68116811
* [=struct/Item=] named <dfn for="network-data">type</dfn>, which is a <code>[=network.DataType=]</code>.
68126812

68136813
A <dfn for="network">collector</dfn> is a [=/struct=] with:
6814-
* [=struct/Item=] named <dfn for="network-collector">max encoded item size</dfn>, which is a js-uint;
6814+
* [=struct/Item=] named <dfn for="network-collector">max encoded data size</dfn>, which is a js-uint;
68156815
* [=struct/item=] named <dfn for="network-collector">contexts</dfn>, which is a [=/list=] of [=navigable id=];
68166816
* [=struct/item=] named <dfn for="network-collector">data types</dfn>, which is a [=/list=] of <code>[=network.DataType=]</code>;
68176817
* [=struct/item=] named <dfn for="network-collector">collector</dfn>, which is a <code>[=network.Collector=]</code>;
68186818
* [=struct/item=] named <dfn for="network-collector">collector type</dfn>, which is a <code>[=network.CollectorType=]</code>;
68196819
* [=struct/item=] named <dfn for="network-collector">user contexts</dfn>, which is a [=/list=] of <code>[=browser.UserContext=]</code>.
68206820

6821-
Note: [=network-collector/Max encoded item size=] defines the limit per item (response or request),
6821+
Note: [=network-collector/Max encoded data size=] defines the limit per item (response or request),
68226822
and does not limit the size collected by the specific collector. The total size of all collected resources is
6823-
limited by [=max total collected size=].
6823+
limited by [=max total data size=].
68246824

68256825
A [=BiDi session=] has <dfn>network collectors</dfn> which is a [=/map=] between
68266826
<code>[=network.Collector=]</code> and a [=network/collector=]. It is initially empty.
68276827

68286828
A [=remote end=] has <dfn>collected network data</dfn> which is a list of
68296829
[=network data=]. It is initially empty.
68306830

6831-
A [=remote end=] has a <dfn>max total collected size</dfn> which is a js-uint representing
6831+
A [=remote end=] has a <dfn>max total data size</dfn> which is a js-uint representing
68326832
the size allocated to collect network data in [=collected network data=]. Its
68336833
value is implementation-defined.
68346834

@@ -6905,8 +6905,8 @@ To <dfn>get collected data</dfn> given |request id| and |data type|.
69056905

69066906
1. For |collected data| of [=collected network data=]:
69076907

6908-
1. If |collected data|'s <code>request</code> is |request id| and
6909-
|collected data|'s <code>type</code> is |data type|, return |collected data|.
6908+
1. If |collected data|'s [=network-data/request=] is |request id| and
6909+
|collected data|'s [=network-data/type=] is |data type|, return |collected data|.
69106910

69116911
1. Return null.
69126912

@@ -6919,7 +6919,7 @@ To <dfn>maybe abort network response body collection</dfn> given |request|:
69196919

69206920
1. If |collected data| is null, return.
69216921

6922-
1. Set |collected data|'s <code>pending</code> to false.
6922+
1. Set |collected data|'s [=network-data/pending=] to false.
69236923

69246924
1. [=Resume=] with "<code>network data collected</code>" and (|request|'s [=request id=], "response").
69256925

@@ -6939,7 +6939,7 @@ To <dfn>maybe collect network response body</dfn> given |request| and |response|
69396939
NOTE: This might happen if there are no collectors setup when the response is created,
69406940
and [=clone network response body=] does not clone the corresponding body.
69416941

6942-
1. Set |collected data|'s <code>pending</code> to false.
6942+
1. Set |collected data|'s [=network-data/pending=] to false.
69436943

69446944
1. Let |navigable| be [=get navigable for request=] with |request|.
69456945

@@ -6997,22 +6997,23 @@ To <dfn>maybe collect network response body</dfn> given |request| and |response|
69976997

69986998
1. Let |processBodyError| be this step: Do nothing.
69996999

7000-
1. [=Fully read=] |collected data|’s <code>cloned body</code> given |processBody| and |processBodyError|.
7000+
1. [=Fully read=] |collected data|’s [=network-data/cloned body=] given |processBody| and |processBodyError|.
70017001

70027002
1. If |bytes| is not null:
70037003

70047004
1. For |collector| in |collectors|:
70057005

7006-
1. If |size| is less than or equal to |collector|'s [=network-collector/max encoded item size=],
7007-
[=list/append=] |collector|'s [=network-collector/collector=] to |collected data|'s <code>collectors</code>.
7006+
1. If |size| is less than or equal to |collector|'s [=network-collector/max encoded data size=],
7007+
[=list/append=] |collector|'s [=network-collector/collector=] to |collected data|'s
7008+
[=network-data/collectors=].
70087009

7009-
1. If |collected data|'s <code>collectors</code> is not [=list/empty=]:
7010+
1. If |collected data|'s [=network-data/collectors=] is not [=list/empty=]:
70107011

70117012
1. [=Allocate size to record data=] given |size|.
70127013

7013-
1. Set |collected data|'s <code>bytes</code> to |bytes|.
7014+
1. Set |collected data|'s [=network-data/bytes=] to |bytes|.
70147015

7015-
1. Set |collected data|'s <code>size</code> to |size|.
7016+
1. Set |collected data|'s [=network-data/size=] to |size|.
70167017

70177018
1. Otherwise, [=list/remove=] |collected data| from [=collected network data=].
70187019

@@ -7023,27 +7024,27 @@ To <dfn>maybe collect network response body</dfn> given |request| and |response|
70237024
<div algorithm>
70247025
To <dfn>allocate size to record data</dfn> given |size|:
70257026

7026-
1. Let |available size| be [=max total collected size=].
7027+
1. Let |available size| be [=max total data size=].
70277028

70287029
1. Let |already collected data| be an empty list.
70297030

70307031
1. For each |collected data| in [=collected network data=]:
70317032

7032-
1. If |collected data|'s <code>bytes</code> is not null:
7033+
1. If |collected data|'s [=network-data/bytes=] is not null:
70337034

7034-
1. Decrease |available size| by |collected data|'s <code>size</code>.
7035+
1. Decrease |available size| by |collected data|'s [=network-data/size=].
70357036

70367037
1. [=list/Append=] |collected data| to |already collected data|
70377038

70387039
1. If |size| is greater than |available size|:
70397040

70407041
1. For each |collected data| in |already collected data|:
70417042

7042-
1. Increase |available size| by |collected data|'s <code>size</code>.
7043+
1. Increase |available size| by |collected data|'s [=network-data/size=].
70437044

7044-
1. Set |collected data|'s <code>bytes</code> field to null.
7045+
1. Set |collected data|'s [=network-data/bytes=] field to null.
70457046

7046-
1. Set |collected data|'s <code>size</code> field to null.
7047+
1. Set |collected data|'s [=network-data/size=] field to null.
70477048

70487049
1. If |available size| is greater than or equal to |size|, return.
70497050

@@ -7052,11 +7053,11 @@ To <dfn>allocate size to record data</dfn> given |size|:
70527053
<div algorithm>
70537054
To <dfn>remove collector from data</dfn> given |collected data| and |collector id|:
70547055

7055-
1. If |collected data|'s <code>collectors</code> [=list/contains=] |collector id|:
7056+
1. If |collected data|'s [=network-data/collectors=] [=list/contains=] |collector id|:
70567057

7057-
1. [=list/Remove=] |collector id| from |collected data|'s <code>collectors</code>.
7058+
1. [=list/Remove=] |collector id| from |collected data|'s [=network-data/collectors=].
70587059

7059-
1. If |collected data|'s <code>collectors</code> is [=list/empty=]:
7060+
1. If |collected data|'s [=network-data/collectors=] is [=list/empty=]:
70607061

70617062
1. [=list/Remove=] |collected data| from [=collected network data=].
70627063

@@ -8490,16 +8491,16 @@ The [=remote end steps=] given |session| and |command parameters| are:
84908491
1. Let |data types| be [=set/create|create a set=] with
84918492
|command parameters|["<code>dataTypes</code>"].
84928493

8493-
1. Let |max encoded item size| be |command parameters|
8494+
1. Let |max encoded data size| be |command parameters|
84948495
["<code>maxEncodedDataSize</code>"].
84958496

84968497
Note: The <code>maxEncodedDataSize</code> parameter represents
8497-
[=network-collector/max encoded item size=] and limits the size of each request collected by the
8498+
[=network-collector/max encoded data size=] and limits the size of each request collected by the
84988499
given collector, not the total collector's collected size.
84998500

85008501
Note: Different implementations might support different encodings, which means the
85018502
encoded size might be different between browsers. Therefore, for the same data collector
8502-
configuration, some network data might fit the [=network-collector/max encoded item size=] only
8503+
configuration, some network data might fit the [=network-collector/max encoded data size=] only
85038504
in some implementations.
85048505

85058506
1. Let |collector type| be |command parameters|
@@ -8514,8 +8515,8 @@ The [=remote end steps=] given |session| and |command parameters| are:
85148515
1. If |input user context ids| is not empty and |input context ids| is not
85158516
empty, return [=error=] with [=error code=] [=invalid argument=].
85168517

8517-
1. If |max encoded item size| is 0 or |max encoded item size| is greater than
8518-
[=max total collected size=], return [=error=] with [=error code=] [=invalid argument=].
8518+
1. If |max encoded data size| is 0 or |max encoded data size| is greater than
8519+
[=max total data size=], return [=error=] with [=error code=] [=invalid argument=].
85198520

85208521
1. If |input context ids| is not [=set/empty=]:
85218522

@@ -8536,7 +8537,7 @@ The [=remote end steps=] given |session| and |command parameters| are:
85368537
1. If |user context| is null, return [=error=] with [=error code=] [=invalid argument=].
85378538

85388539
1. Let |collector| be a [=network/collector=] with
8539-
[=network-collector/max encoded item size=] field set to |max encoded item size|,
8540+
[=network-collector/max encoded data size=] field set to |max encoded data size|,
85408541
[=network-collector/data types=] field set to |data types|,
85418542
[=network-collector/collector=] field set to |collector id|,
85428543
[=network-collector/collector type=] field set to |collector type|,
@@ -9065,16 +9066,16 @@ The [=remote end steps=] given |session| and |command parameters| are:
90659066

90669067
1. Return [=error=] with [=error code=] [=no such network data=].
90679068

9068-
1. If |collected data|'s <code>pending</code> is true:
9069+
1. If |collected data|'s [=network-data/pending=] is true:
90699070

90709071
1. [=Await=] with "network data collected" and (|request id|, |data type|).
90719072

9072-
1. If |collector id| is not null and if |collected data|'s <code>collectors</code>
9073+
1. If |collector id| is not null and if |collected data|'s [=network-data/collectors=]
90739074
does not [=list/contain=] |collector id|:
90749075

90759076
1. Return [=error=] with [=error code=] [=no such network data=].
90769077

9077-
1. Let |bytes| be |collected data|'s <code>bytes</code>.
9078+
1. Let |bytes| be |collected data|'s [=network-data/bytes=].
90789079

90799080
1. If |bytes| is null,
90809081

0 commit comments

Comments
 (0)