Skip to content

Commit 15443fe

Browse files
authored
Update EnsureCSPDoesNotBlockStringCompilation to match updated HostEnsureCanCompileStrings definition
1 parent 8fe5fe8 commit 15443fe

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

index.bs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ spec:html
3535
text: style
3636
type: element-attr
3737
text: ping
38+
type:interface
39+
text:SharedWorker
3840
spec:fetch
3941
type: dfn
4042
text: main fetch
@@ -1442,10 +1444,11 @@ spec: WebRTC; urlPrefix: https://www.w3.org/TR/webrtc/
14421444
to determine whether such compilation ought to be blocked.
14431445

14441446
<h4 id="can-compile-strings" algorithm dfn export>
1445-
EnsureCSPDoesNotBlockStringCompilation(|realm|, |source|)
1447+
EnsureCSPDoesNotBlockStringCompilation(|realm|, |parameterStrings|, |bodyString|, |codeString|, |compilationType|, |parameterArgs|, |bodyArg|)
14461448
</h4>
14471449

1448-
Given a <a>realm</a> |realm| and a string |source|, this algorithm
1450+
Given a <a>realm</a> |realm|, a list of strings |parameterStrings|, a string |bodyString|, a string |codeString|, an enum (|compilationType|),
1451+
a list of ECMAScript language values (|parameterArgs|), and an ECMAScript language value (|bodyArg|), this algorithm
14491452
returns normally if string compilation is allowed, and throws an "`EvalError`"
14501453
if not:
14511454

@@ -1474,7 +1477,7 @@ spec: WebRTC; urlPrefix: https://www.w3.org/TR/webrtc/
14741477

14751478
3. If |source-list| [=list/contains=] the expression
14761479
"<a grammar>`'report-sample'`</a>", then set |violation|'s [=violation/sample=] to
1477-
the substring of |source| containing its first 40 characters.
1480+
the substring of |codeString| containing its first 40 characters.
14781481

14791482
4. Execute [[#report-violation]] on |violation|.
14801483

@@ -1483,9 +1486,7 @@ spec: WebRTC; urlPrefix: https://www.w3.org/TR/webrtc/
14831486

14841487
4. If |result| is "`Blocked`", throw an `EvalError` exception.
14851488

1486-
ISSUE(tc39/ecma262#938): {{HostEnsureCanCompileStrings()}} does not include the string which is
1487-
going to be compiled as a parameter. We'll also need to update HTML to pipe that value through
1488-
to CSP.
1489+
Note: |parameterStrings|, |bodyString|, |compilationType|, |parameterArgs|, and |bodyArg| are currently unused. They are included for future use.
14891490

14901491
<h3 id="wasm-integration">Integration with WebAssembly</h3>
14911492

0 commit comments

Comments
 (0)