diff options
Diffstat (limited to 'src/bun.js/bindings/bindings.cpp')
-rw-r--r-- | src/bun.js/bindings/bindings.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/bun.js/bindings/bindings.cpp b/src/bun.js/bindings/bindings.cpp index e64162b34..74357f225 100644 --- a/src/bun.js/bindings/bindings.cpp +++ b/src/bun.js/bindings/bindings.cpp @@ -1192,6 +1192,16 @@ void WebCore__DOMURL__pathname_(WebCore__DOMURL* domURL, ZigString* arg1) *arg1 = Zig::toZigString(pathname); } +BunString WebCore__DOMURL__fileSystemPath(WebCore__DOMURL* arg0) +{ + const WTF::URL& url = arg0->href(); + if (url.isLocalFile()) { + return Bun::toString(url.fileSystemPath()); + } + + return BunStringEmpty; +} + extern "C" JSC__JSValue ZigString__toJSONObject(const ZigString* strPtr, JSC::JSGlobalObject* globalObject) { auto str = Zig::toString(*strPtr); @@ -3690,12 +3700,10 @@ JSC__JSValue JSC__VM__runGC(JSC__VM* vm, bool sync) JSC::JSLockHolder lock(vm); vm->finalizeSynchronousJSExecution(); - WTF::releaseFastMallocFreeMemory(); if (sync) { vm->heap.collectNow(JSC::Sync, JSC::CollectionScope::Full); - WTF::releaseFastMallocFreeMemory(); } else { vm->heap.collectSync(JSC::CollectionScope::Full); } |