diff options
author | 2022-09-20 00:45:19 -0700 | |
---|---|---|
committer | 2022-09-20 00:45:19 -0700 | |
commit | f0bc50eb71d08b3e3429250e4317ed084b32391c (patch) | |
tree | da03e1a48d709b87baf645a61aae8c44893bff1a | |
parent | 6163fb830e0462105fb709632eddd4deb3d7ee85 (diff) | |
download | bun-f0bc50eb71d08b3e3429250e4317ed084b32391c.tar.gz bun-f0bc50eb71d08b3e3429250e4317ed084b32391c.tar.zst bun-f0bc50eb71d08b3e3429250e4317ed084b32391c.zip |
meant to include this in the previous commit
-rw-r--r-- | src/bun.js/bindings/ZigGlobalObject.h | 4 | ||||
-rw-r--r-- | src/http_client_async.zig | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/bun.js/bindings/ZigGlobalObject.h b/src/bun.js/bindings/ZigGlobalObject.h index 41c304e10..17aee4645 100644 --- a/src/bun.js/bindings/ZigGlobalObject.h +++ b/src/bun.js/bindings/ZigGlobalObject.h @@ -330,6 +330,8 @@ public: mutable WriteBarrier<Unknown> m_JSFetchHeadersSetterValue; mutable WriteBarrier<Unknown> m_JSURLSearchParamsSetterValue; + JSObject* navigatorObject(); + void trackFFIFunction(JSC::JSFunction* function) { this->m_ffiFunctions.append(JSC::Strong<JSC::JSFunction> { vm(), function }); @@ -382,6 +384,8 @@ private: LazyClassStructure m_JSStringDecoderClassStructure; LazyClassStructure m_JSReadableStateClassStructure; + LazyProperty<JSGlobalObject, JSObject> m_navigatorObject; + LazyProperty<JSGlobalObject, JSObject> m_JSArrayBufferControllerPrototype; LazyProperty<JSGlobalObject, JSObject> m_JSHTTPSResponseControllerPrototype; LazyProperty<JSGlobalObject, Structure> m_JSHTTPResponseController; diff --git a/src/http_client_async.zig b/src/http_client_async.zig index 3ba0c0b7c..a60128cdc 100644 --- a/src/http_client_async.zig +++ b/src/http_client_async.zig @@ -809,7 +809,7 @@ else const accept_encoding_header_hash = hashHeaderName("Accept-Encoding"); -const user_agent_header = picohttp.Header{ .name = "User-Agent", .value = "bun.js " ++ Global.package_json_version }; +const user_agent_header = picohttp.Header{ .name = "User-Agent", .value = Global.user_agent }; const user_agent_header_hash = hashHeaderName("User-Agent"); const location_header_hash = hashHeaderName("Location"); |