Re: [v8-dev] Strange d8 Web Worker API behavior?

16 views
Skip to first unread message

Marja Hölttä

unread,
Dec 11, 2024, 3:32:49 AM12/11/24
to v8-...@googlegroups.com
The first part (accepting {type: 'function'}) is a nonstandard d8 feature which we use for fuzzing.

d8 is not a standard conformant implementation of any web spec, it's our test runner. It both has features which are useful for testing but not standardized (and won't ever be), and on the other hand, it only implements a handful of functionalities typically found in web browsers, such as console.log (but it doesn't implement anything DOM related).

Could you tell us more about what you're using d8 for and why is it important that this is working in d8?

IIRC, the Worker implementation of d8 is also not standard conformant (it's just enough to run the tests but not more), but it's been a couple of years since I looked into it the last time, so I'm not 100% sure about what the delta currently is. The same for the event loop. Stuff related to workers and events might just work differently in d8 that you might expect.



On Mon, Dec 9, 2024 at 6:47 PM Keith Teo <keithte...@gmail.com> wrote:
Hi all,

Noticed some strange behavior with Worker() in d8 for the options parameter. These are acceptable:

let worker = new Worker("test.js")
let worker = new Worker(test, { type: 'function' }) //Where test is some js function

The option of type function does not exist according to MDN Worker() docs, type values are supposed to be module or classic.

Yet this throws and invalid argument error:

let worker = new Worker("workingTest.js", {'name': 'test'}); 

In particular I am interested in getting the name field in the options parameter working because Emscripten's multithreading implementation uses it. Any advice on this would be appreciated.

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/v8-dev/67622e10-dde4-44d9-9551-690ccef95a40n%40googlegroups.com.


--


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Liana Sebastian.

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.

    

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.

Reply all
Reply to author
Forward
0 new messages