diff options
author | 2023-08-01 18:40:02 -0700 | |
---|---|---|
committer | 2023-08-01 18:40:02 -0700 | |
commit | 6c40d6f2f51474c6a38d509417db903385f48f2b (patch) | |
tree | d441b10de162e443d572b47ca9c278e3cd345f26 /src/bun.js/bindings/ZigGlobalObject.cpp | |
parent | 0ced5520e6ae8061b2acaab2cbc26431e10182a6 (diff) | |
download | bun-6c40d6f2f51474c6a38d509417db903385f48f2b.tar.gz bun-6c40d6f2f51474c6a38d509417db903385f48f2b.tar.zst bun-6c40d6f2f51474c6a38d509417db903385f48f2b.zip |
add `BroadcastChannel` (#3922)
* copy and format
* update `SerializedScriptValue.cpp`
* use `expect().fail()` in message channel tests
* rename `BroadcastChannelIdentifier.h`
* copy registries
* progress and tests
* cleanup
* worker and broadcast channel test
* `BroadcastChannel` ref and unref
* `MessagePort` ref, unref, and hasRef
* remove `SecurityContext.cpp/h`
* add types
Diffstat (limited to 'src/bun.js/bindings/ZigGlobalObject.cpp')
-rw-r--r-- | src/bun.js/bindings/ZigGlobalObject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp index 3776adb2b..7c1181921 100644 --- a/src/bun.js/bindings/ZigGlobalObject.cpp +++ b/src/bun.js/bindings/ZigGlobalObject.cpp @@ -121,7 +121,7 @@ #include "JSWorker.h" #include "JSMessageChannel.h" #include "JSMessagePort.h" -// #include "JSBroadcastChannel.h" +#include "JSBroadcastChannel.h" #if ENABLE(REMOTE_INSPECTOR) #include "JavaScriptCore/RemoteInspectorServer.h" @@ -942,8 +942,8 @@ WEBCORE_GENERATED_CONSTRUCTOR_SETTER(JSMessageChannel); WEBCORE_GENERATED_CONSTRUCTOR_GETTER(JSMessagePort); WEBCORE_GENERATED_CONSTRUCTOR_SETTER(JSMessagePort); -// WEBCORE_GENERATED_CONSTRUCTOR_GETTER(JSBroadcastChannel); -// WEBCORE_GENERATED_CONSTRUCTOR_SETTER(JSBroadcastChannel); +WEBCORE_GENERATED_CONSTRUCTOR_GETTER(JSBroadcastChannel); +WEBCORE_GENERATED_CONSTRUCTOR_SETTER(JSBroadcastChannel); JSC_DECLARE_CUSTOM_GETTER(JSEvent_getter); @@ -4253,7 +4253,7 @@ void GlobalObject::addBuiltinGlobals(JSC::VM& vm) PUT_WEBCORE_GENERATED_CONSTRUCTOR("Worker"_s, JSWorker); PUT_WEBCORE_GENERATED_CONSTRUCTOR("MessageChannel"_s, JSMessageChannel); PUT_WEBCORE_GENERATED_CONSTRUCTOR("MessagePort"_s, JSMessagePort); - // PUT_WEBCORE_GENERATED_CONSTRUCTOR("BroadcastChannel"_s, JSBroadcastChannel); + PUT_WEBCORE_GENERATED_CONSTRUCTOR("BroadcastChannel"_s, JSBroadcastChannel); putDirectCustomAccessor(vm, builtinNames.TransformStreamPublicName(), CustomGetterSetter::create(vm, jsServiceWorkerGlobalScope_TransformStreamConstructor, nullptr), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum))); putDirectCustomAccessor(vm, builtinNames.TransformStreamPrivateName(), CustomGetterSetter::create(vm, jsServiceWorkerGlobalScope_TransformStreamConstructor, nullptr), attributesForStructure(static_cast<unsigned>(JSC::PropertyAttribute::DontEnum))); |