mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
Use undefined as this in trusted type callbacks (#37594)
As discussed in w3c/trusted-types#468 the spec will be aligned to the other browsers, which call the callback with undefined as this. That also allows us to cleanup the JSContext arguments across a couple of methods. Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
parent
5579b11cf6
commit
d2a688d798
4 changed files with 14 additions and 40 deletions
2
tests/wpt/meta/MANIFEST.json
vendored
2
tests/wpt/meta/MANIFEST.json
vendored
|
@ -824957,7 +824957,7 @@
|
|||
]
|
||||
],
|
||||
"TrustedTypePolicy-createXXX.html": [
|
||||
"f51f51d98455ebccdee31a5b0d844a926b27fc0e",
|
||||
"957a691bcd909d71b2b34a4256fe7168cd14930b",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
[ s => null, "" ],
|
||||
[ s => "well, " + s, "well, whatever" ],
|
||||
[ s => { throw new Error() }, Error ],
|
||||
[ new WrappingClass().callback_to_capture_this, "null"],
|
||||
[ new WrappingClass().callback_to_capture_this, "undefined"],
|
||||
[ s => { aGlobalVarForSideEffectTesting = s; return s }, "whatever" ],
|
||||
[ s => aGlobalVarForSideEffectTesting + s, "whateverwhatever" ],
|
||||
[ aGlobalFunction.bind(aGlobalObject), "well, whatever" ],
|
||||
|
@ -73,7 +73,7 @@
|
|||
[ s => null, "" ],
|
||||
[ s => s + "#duck", INPUTS.SCRIPTURL + "#duck" ],
|
||||
[ s => { throw new Error() }, Error ],
|
||||
[ new WrappingClass().callback_to_capture_this, "null"],
|
||||
[ new WrappingClass().callback_to_capture_this, "undefined"],
|
||||
[ s => s + "#" + aGlobalVarForSideEffectTesting,
|
||||
INPUTS.SCRIPTURL + "#global" ],
|
||||
[ anotherGlobalFunction.bind(aGlobalObject), INPUTS.SCRIPTURL + "#well," ],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue