Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/build/deps/webkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* for local mode. Override via `--webkit-version=<hash>` to test a branch.
* From https://github.com/oven-sh/WebKit releases.
*/
export const WEBKIT_VERSION = "c6cfe90c6064bd80a1916b844c2f092735cfc720";
export const WEBKIT_VERSION = "autobuild-preview-pr-455-8fc20b18";

Check failure on line 6 in scripts/build/deps/webkit.ts

View check run for this annotation

Claude / Claude Code Review

WebKit upgrade test file deleted — behavioral changes ship without automated tests

Commit 94c27b75 deletes `test/js/bun/jsc/webkit-upgrade-47f72501.test.ts` — the file the PR description cites as this upgrade's automated coverage — leaving the net diff at 7 files with zero tests. REVIEW.md requires every behavioral change to ship an automated test in the same PR, and requires every test deletion to have a stated reason or replacement; neither is given here. Please restore the file (or state why it was removed and where the replacement coverage lives).
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
Comment thread
robobun marked this conversation as resolved.
Outdated

/**
* WebKit (JavaScriptCore) — the JS engine.
Expand Down
7 changes: 5 additions & 2 deletions src/js_printer/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,17 @@ pub mod analyze_transpiled_module {
Self(value.0)
}
/// JSC `ScriptFetchParameters::Type` value. `None` maps to `JavaScript`
/// (NodesAnalyzeModule's no-attribute default).
/// (NodesAnalyzeModule's no-attribute default). JSC's `Text` (4) is never
/// produced: with BUN_JSC_ADDITIONS `type: "text"` is host-defined like
/// every other non-json/wasm type. Pinned by the static_asserts in
/// BunAnalyzeTranspiledModule.cpp.
#[inline]
pub fn to_script_fetch_parameters_type(self) -> u8 {
match self {
Self::None | Self::Javascript => 1,
Self::Webassembly => 2,
Self::Json => 3,
_ => 4,
_ => 5,
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/jsc/bindings/BunAnalyzeTranspiledModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ extern "C" void JSC_JSModuleRecord__addRequestedModuleHostDefined(JSModuleRecord
static_assert(static_cast<uint8_t>(JSC::ScriptFetchParameters::Type::JavaScript) == 1, "ScriptFetchParameters::Type tag drift vs to_script_fetch_parameters_type()");
static_assert(static_cast<uint8_t>(JSC::ScriptFetchParameters::Type::WebAssembly) == 2, "ScriptFetchParameters::Type tag drift vs to_script_fetch_parameters_type()");
static_assert(static_cast<uint8_t>(JSC::ScriptFetchParameters::Type::JSON) == 3, "ScriptFetchParameters::Type tag drift vs to_script_fetch_parameters_type()");
static_assert(static_cast<uint8_t>(JSC::ScriptFetchParameters::Type::HostDefined) == 4, "ScriptFetchParameters::Type tag drift vs to_script_fetch_parameters_type()");
static_assert(static_cast<uint8_t>(JSC::ScriptFetchParameters::Type::Text) == 4, "ScriptFetchParameters::Type tag drift vs to_script_fetch_parameters_type()");
static_assert(static_cast<uint8_t>(JSC::ScriptFetchParameters::Type::HostDefined) == 5, "ScriptFetchParameters::Type tag drift vs to_script_fetch_parameters_type()");

extern "C" void JSC_JSModuleRecord__addImportEntrySingle(JSModuleRecord* moduleRecord, Identifier* identifierArray, uint32_t importName, uint32_t localName, uint32_t moduleName, uint8_t moduleRequestType)
{
Expand Down
4 changes: 4 additions & 0 deletions src/jsc/bindings/NodeVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ static JSValue scriptFetchParametersToImportAttributes(JSGlobalObject* globalObj
case JSC::ScriptFetchParameters::Type::JavaScript:
obj->putDirect(vm, vm.propertyNames->type, jsNontrivialString(vm, "javascript"_s));
break;
case JSC::ScriptFetchParameters::Type::Text:
// Unreachable with BUN_JSC_ADDITIONS (`type: "text"` parses as HostDefined); kept so the switch stays exhaustive.
obj->putDirect(vm, vm.propertyNames->type, jsNontrivialString(vm, "text"_s));
break;
case JSC::ScriptFetchParameters::Type::HostDefined:
obj->putDirect(vm, vm.propertyNames->type, jsString(vm, params->hostDefinedImportType()));
break;
Expand Down
4 changes: 3 additions & 1 deletion src/jsc/bindings/NodeVMSyntheticModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ void NodeVMSyntheticModule::createModuleRecord(JSGlobalObject* globalObject)
{
VM& vm = globalObject->vm();

SyntheticModuleRecord* moduleRecord = SyntheticModuleRecord::create(globalObject, vm, globalObject->syntheticModuleRecordStructure(), Identifier::fromString(vm, identifier()));
// The source type only feeds AbstractModuleRecord::moduleType(), which the loader attaches to
// errors as the failing module's kind; a vm.SyntheticModule is a JavaScript module in that sense.
SyntheticModuleRecord* moduleRecord = SyntheticModuleRecord::create(globalObject, vm, globalObject->syntheticModuleRecordStructure(), Identifier::fromString(vm, identifier()), SourceProviderSourceType::Module);

m_moduleRecord.set(vm, this, moduleRecord);

Expand Down
2 changes: 1 addition & 1 deletion src/jsc/bindings/root.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
#include <JavaScriptCore/JSCJSValue.h>
#include <wtf/text/MakeString.h>
#include <JavaScriptCore/JSCInlines.h>
#include <JavaScriptCore/HandleSet.h>
#include <JavaScriptCore/StrongSet.h>
#include <wtf/Ref.h>
#include <wtf/ThreadSafeRefCounted.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/jsc/bindings/wtf-bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ static thread_local WTF::StackBounds stackBoundsForCurrentThread = WTF::StackBou

extern "C" [[ZIG_EXPORT(nothrow)]] void Bun__StackCheck__initialize()
{
stackBoundsForCurrentThread = WTF::StackBounds::currentThreadStackBounds();
stackBoundsForCurrentThread = WTF::StackBounds::currentThreadStackBoundsForEmbedder();
}

extern "C" [[ZIG_EXPORT(nothrow)]] __attribute__((__always_inline__)) void* Bun__StackCheck__getMaxStack()
Expand Down
Loading