mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
Linux works now.
This commit is contained in:
@@ -544,3 +544,7 @@ pub const JSString = struct {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// not official api functions
|
||||
pub extern "c" fn JSCInitialize() void;
|
||||
|
||||
Submodule src/javascript/jsc/WebKit updated: 2312676710...487a7b31de
@@ -58,6 +58,8 @@
|
||||
#include <wtf/text/StringView.h>
|
||||
#include <wtf/text/WTFString.h>
|
||||
|
||||
#include <wtf/Gigacage.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
@@ -82,22 +84,21 @@ namespace JSCastingHelpers = JSC::JSCastingHelpers;
|
||||
|
||||
bool has_loaded_jsc = false;
|
||||
|
||||
extern "C" JSC__JSGlobalObject *Zig__GlobalObject__create(JSClassRef *globalObjectClass, int count,
|
||||
void *console_client) {
|
||||
|
||||
if (!has_loaded_jsc) {
|
||||
extern "C" void JSCInitialize() {
|
||||
if (has_loaded_jsc) return;
|
||||
JSC::Options::useSourceProviderCache() = true;
|
||||
JSC::Options::useUnlinkedCodeBlockJettisoning() = false;
|
||||
// JSC::Options::useTopLevelAwait() = true;
|
||||
JSC::Options::exposeInternalModuleLoader() = true;
|
||||
std::set_terminate([]() { Zig__GlobalObject__onCrash(); });
|
||||
// std::set_terminate([]() { Zig__GlobalObject__onCrash(); });
|
||||
WTF::initializeMainThread();
|
||||
JSC::initialize();
|
||||
// Gigacage::disablePrimitiveGigacage();
|
||||
has_loaded_jsc = true;
|
||||
}
|
||||
|
||||
// JSC::Options::useCodeCache() = false;
|
||||
}
|
||||
|
||||
extern "C" JSC__JSGlobalObject *Zig__GlobalObject__create(JSClassRef *globalObjectClass, int count,
|
||||
void *console_client) {
|
||||
auto heapSize = JSC::LargeHeap;
|
||||
|
||||
JSC::VM &vm = JSC::VM::create(heapSize).leakRef();
|
||||
|
||||
Reference in New Issue
Block a user