[webkit-dev] Invocation with undefined this on JS binding object

Xabier Rodríguez Calvar calvaris at igalia.com
Thu Jul 2 01:03:28 PDT 2015


	Hi,

O Mér, 01-07-2015 ás 11:07 -0700, Geoffrey Garen escribiu:
> What exactly did you do when you tried that, and why exactly didn’t
> it work?

What I tried was running the tests, concretely streams/reference
-implementation/count-queuing-strategy.html and subtest "Correctly
governs the return value of a ReadableStream\'s enqueue function (HWM =
0)" which causes enqueue to be called and therefore the
readableStream at strategySize function to be run with undefined this,
that was previously assigned from the size method of a newly created
CountQueuingStrategy.

> Side note: Shouldn’t this function bear the name “strategySize” 
> rather than “size”?

No, the spec says that our internal slot at ReadableStream should be
called "strategySize" [1], but it clearly states that the method at
CountQueuingStrategy should be called "size" [2]. Besides this, the
reference implementation tests also operate on this assumption.

[1] https://streams.spec.whatwg.org/#rs-internal-slots
[2] https://streams.spec.whatwg.org/#cqs-class-definition

Thanks and best regards.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20150702/834a5002/attachment.sig>


More information about the webkit-dev mailing list