aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/ZigGlobalObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/bindings/ZigGlobalObject.h')
-rw-r--r--src/bun.js/bindings/ZigGlobalObject.h33
1 files changed, 14 insertions, 19 deletions
diff --git a/src/bun.js/bindings/ZigGlobalObject.h b/src/bun.js/bindings/ZigGlobalObject.h
index cad68f79a..0bdfd1d82 100644
--- a/src/bun.js/bindings/ZigGlobalObject.h
+++ b/src/bun.js/bindings/ZigGlobalObject.h
@@ -1,3 +1,6 @@
+// This header is included in nearly every file.
+// Be very cautious of sticking your #include in this file.
+// TODO: rename this to BunGlobalObject
#pragma once
#ifndef ZIG_GLOBAL_OBJECT
@@ -10,41 +13,38 @@ class LazyClassStructure;
} // namespace JSC
+namespace JSC {
+
+enum class JSPromiseRejectionOperation : unsigned;
+
+}
+
namespace WebCore {
class ScriptExecutionContext;
class DOMGuardedObject;
class EventLoopTask;
+class DOMWrapperWorld;
}
#include "root.h"
#include "headers-handwritten.h"
-#include "BunClientData.h"
#include "JavaScriptCore/CatchScope.h"
#include "JavaScriptCore/JSGlobalObject.h"
#include "JavaScriptCore/JSTypeInfo.h"
#include "JavaScriptCore/Structure.h"
#include "WebCoreJSBuiltinInternals.h"
-#include "JSEnvironmentVariableMap.h"
-
-#include "ZigConsoleClient.h"
#include "DOMConstructors.h"
-#include "DOMWrapperWorld-class.h"
-#include "DOMIsoSubspaces.h"
#include "BunPlugin.h"
-#include "ErrorStackTrace.h"
-#include "CallSite.h"
-#include "CallSitePrototype.h"
-
namespace WebCore {
class SubtleCrypto;
}
extern "C" void Bun__reportError(JSC__JSGlobalObject*, JSC__JSValue);
-extern "C" void Bun__reportUnhandledError(JSGlobalObject*, EncodedJSValue);
+extern "C" void Bun__reportUnhandledError(JSC__JSGlobalObject*, JSC::EncodedJSValue);
// defined in ModuleLoader.cpp
extern "C" JSC::EncodedJSValue jsFunctionOnLoadObjectResultResolve(JSC::JSGlobalObject* globalObject, JSC::CallFrame* callFrame);
extern "C" JSC::EncodedJSValue jsFunctionOnLoadObjectResultReject(JSC::JSGlobalObject* globalObject, JSC::CallFrame* callFrame);
@@ -82,18 +82,13 @@ public:
static const JSC::ClassInfo s_info;
static const JSC::GlobalObjectMethodTable s_globalObjectMethodTable;
- template<typename, SubspaceAccess mode> static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm)
+ template<typename, JSC::SubspaceAccess mode> static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm)
{
if constexpr (mode == JSC::SubspaceAccess::Concurrently)
return nullptr;
- return WebCore::subspaceForImpl<GlobalObject, WebCore::UseCustomHeapCellType::Yes>(
- vm,
- [](auto& spaces) { return spaces.m_clientSubspaceForWorkerGlobalScope.get(); },
- [](auto& spaces, auto&& space) { spaces.m_clientSubspaceForWorkerGlobalScope = std::forward<decltype(space)>(space); },
- [](auto& spaces) { return spaces.m_subspaceForWorkerGlobalScope.get(); },
- [](auto& spaces, auto&& space) { spaces.m_subspaceForWorkerGlobalScope = std::forward<decltype(space)>(space); },
- [](auto& server) -> JSC::HeapCellType& { return server.m_heapCellTypeForJSWorkerGlobalScope; });
+ return subspaceForImpl(vm);
}
+ static JSC::GCClient::IsoSubspace* subspaceForImpl(JSC::VM& vm);
~GlobalObject();
static void destroy(JSC::JSCell*);
=dylan/github-api-option&id=83e4d04ce70c36e8461afe6f9f9c5547f5221fa2&follow=1'>wip support #!Gravatar Jarred Sumner 1-1/+6 2022-08-20fix(ReferenceError): expected type in getCode (#1120)Gravatar Hyro 1-1/+1 2022-08-20Fix running zig testsGravatar Jarred Sumner 1-3/+10 2022-08-20Fix crash on invalid JSXGravatar Jarred Sumner 1-1/+1 2022-08-20Add `code` to `ResolveError`Gravatar Jarred Sumner 1-0/+14 2022-08-20Add buffer.indexOf, includes and lastIndexOf (#1112)Gravatar Zilin Zhu 2-32/+237 2022-08-19fix buffer.slice(0, 0) (#1114)Gravatar Zilin Zhu 23-27/+58 2022-08-19fix buffer.copy (#1113)Gravatar Zilin Zhu 2-21/+35 2022-08-19Update build-idGravatar Jarred Sumner 1-1/+1 2022-08-19Make React SSR up to 3x fasterGravatar Jarred Sumner 1-238/+247 2022-08-192x faster `Bun.serve` with async function handlersGravatar Jarred Sumner 1-4/+13 2022-08-19Update bun init testbun-v0.1.10Gravatar Jarred Sumner 1-2/+2 2022-08-18Synchronously dispatch `close` eventGravatar Jarred Sumner 1-0/+5 2022-08-18Fix memory leak in `WebSocket`Gravatar Jarred Sumner 1-13/+4 2022-08-18Make `Request`, `Response` and `TextDecoder` not read-onlyGravatar Jarred Sumner 7-120/+180 2022-08-18Update build-idGravatar Jarred Sumner 1-1/+1 2022-08-18un-delete some codeGravatar Jarred Sumner 2-8/+15 2022-08-18Add string support to `Buffer.fill`Gravatar Jarred Sumner 7-77/+119 2022-08-18[node compat] Fix issue with `Buffer.compare` when called on the constructorGravatar Jarred Sumner 1-31/+42 2022-08-18Fix console.log printing `[native code]` for too many thingsGravatar Jarred Sumner 1-1/+6 2022-08-18Faster TextDecoderGravatar Jarred Sumner 24-369/+399 2022-08-18Fix Next.js regressionGravatar Jarred Sumner 1-12/+45 2022-08-18Fix `bun:wrap` not loadingGravatar Jarred Sumner 3-21/+41