Skip to content

Commit 5c84c5d

Browse files
authored
Merge branch 'main' into vaish/restart-from-step
2 parents 4c54305 + 0085887 commit 5c84c5d

44 files changed

Lines changed: 176 additions & 175 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build/deps/gen/deps.MODULE.bazel

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ bazel_dep(name = "brotli", version = "1.2.0.bcr.1")
2727
# capnp-cpp
2828
http.archive(
2929
name = "capnp-cpp",
30-
sha256 = "448986f71b544270896a5d4feb306827072a7c1a05156358c33e8218fe79c59b",
31-
strip_prefix = "capnproto-capnproto-d0e9605/c++",
30+
sha256 = "3b0cb96441f2d72dab755e87b2ab8969fdfa096d62b5eb6f4bedd271d391967a",
31+
strip_prefix = "capnproto-capnproto-59a195f/c++",
3232
type = "tgz",
33-
url = "https://github.com/capnproto/capnproto/tarball/d0e9605b288ac4d8b86ee3201a23c43c017a6b61",
33+
url = "https://github.com/capnproto/capnproto/tarball/59a195f011f259484acc71255bab8e1b67ef54d3",
3434
)
3535
use_repo(http, "capnp-cpp")
3636

@@ -136,10 +136,10 @@ bazel_dep(name = "tcmalloc", version = "0.0.0-20250927-12f2552")
136136
# workerd-cxx
137137
http.archive(
138138
name = "workerd-cxx",
139-
sha256 = "81e21ec4318e31bf33101bbda567b891c7643b604675121726f1ecdcb76b9e20",
140-
strip_prefix = "cloudflare-workerd-cxx-8467078",
139+
sha256 = "ee0867e96d70a37e2bb596f60051665ba828ad5f9237fe752811bb18f4f9fe07",
140+
strip_prefix = "cloudflare-workerd-cxx-acbc654",
141141
type = "tgz",
142-
url = "https://github.com/cloudflare/workerd-cxx/tarball/8467078a6607ff93fe0b26cc92aa17ffa57bf83a",
142+
url = "https://github.com/cloudflare/workerd-cxx/tarball/acbc6548b09d50f20ac8fdcf252e802b8cbfc054",
143143
)
144144
use_repo(http, "workerd-cxx")
145145

src/workerd/api/basics.c++

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,8 @@ class AbortTriggerRpcServer final: public rpc::AbortTrigger::Server {
625625
AbortSignal::AbortSignal(kj::Maybe<kj::Exception> exception,
626626
jsg::Optional<jsg::JsRef<jsg::JsValue>> maybeReason,
627627
Flag flag)
628-
: canceler(
629-
IoContext::current().addObject(kj::refcounted<RefcountedCanceler>(kj::cp(exception)))),
628+
: canceler(IoContext::current().addObject(kj::refcounted<RefcountedCanceler>(
629+
exception.map([](const kj::Exception& e) { return e.clone(); })))),
630630
flag(flag),
631631
reason(kj::mv(maybeReason)) {}
632632

@@ -675,14 +675,14 @@ jsg::JsValue AbortSignal::getReason(jsg::Lock& js) {
675675
}
676676

677677
kj::Exception AbortSignal::abortException(
678-
jsg::Lock& js, jsg::Optional<kj::OneOf<kj::Exception, jsg::JsValue>> maybeReason) {
678+
jsg::Lock& js, const jsg::Optional<kj::OneOf<kj::Exception, jsg::JsValue>>& maybeReason) {
679679
KJ_IF_SOME(reason, maybeReason) {
680680
KJ_SWITCH_ONEOF(reason) {
681681
KJ_CASE_ONEOF(reason, jsg::JsValue) {
682682
return js.exceptionToKj(reason);
683683
}
684684
KJ_CASE_ONEOF(reason, kj::Exception) {
685-
return kj::cp(reason);
685+
return reason.clone();
686686
}
687687
}
688688
}
@@ -695,7 +695,7 @@ jsg::Ref<AbortSignal> AbortSignal::abort(jsg::Lock& js, jsg::Optional<jsg::JsVal
695695
KJ_IF_SOME(reason, maybeReason) {
696696
return js.alloc<AbortSignal>(kj::mv(exception), reason.addRef(js));
697697
}
698-
return js.alloc<AbortSignal>(kj::cp(exception), js.exceptionToJsValue(kj::mv(exception)));
698+
return js.alloc<AbortSignal>(exception.clone(), js.exceptionToJsValue(kj::mv(exception)));
699699
}
700700

701701
void AbortSignal::throwIfAborted(jsg::Lock& js) {
@@ -808,7 +808,7 @@ void AbortSignal::triggerAbort(
808808
}
809809
}
810810
} else {
811-
reason = js.exceptionToJsValue(kj::cp(exception));
811+
reason = js.exceptionToJsValue(exception.clone());
812812
}
813813

814814
canceler->cancel(kj::mv(exception));
@@ -981,7 +981,7 @@ kj::Maybe<jsg::JsValue> AbortSignal::deserializePendingReason(jsg::Lock& js) {
981981
}
982982

983983
KJ_CASE_ONEOF(exception, kj::Exception) {
984-
return kj::some(js.exceptionToJsValue(kj::cp(exception)).getHandle(js));
984+
return kj::some(js.exceptionToJsValue(exception.clone()).getHandle(js));
985985
}
986986
}
987987
}

src/workerd/api/basics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ class AbortSignal final: public EventTarget {
693693
kj::Maybe<jsg::JsRef<jsg::JsValue>> onAbortHandler;
694694

695695
static kj::Exception abortException(
696-
jsg::Lock& js, jsg::Optional<kj::OneOf<kj::Exception, jsg::JsValue>> reason);
696+
jsg::Lock& js, const jsg::Optional<kj::OneOf<kj::Exception, jsg::JsValue>>& reason);
697697

698698
void visitForGc(jsg::GcVisitor& visitor);
699699

src/workerd/api/html-rewriter.c++

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ kj::Promise<void> Rewriter::end() {
505505

506506
void Rewriter::abort(kj::Exception reason) {
507507
// End the rewriter and forward the error to the wrapped output stream.
508-
maybeException = kj::cp(reason);
508+
maybeException = reason.clone();
509509

510510
inner->abort(kj::mv(reason));
511511
}
@@ -530,8 +530,8 @@ kj::Promise<void> Rewriter::flushWrite() {
530530
}
531531

532532
KJ_IF_SOME(exception, maybeException) {
533-
inner->abort(kj::cp(exception));
534-
kj::throwFatalException(kj::cp(exception));
533+
inner->abort(exception.clone());
534+
kj::throwFatalException(exception.clone());
535535
}
536536
}
537537
template <typename T, typename CType>

src/workerd/api/hyperdrive.c++

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jsg::Ref<Socket> Hyperdrive::connect(jsg::Lock& js) {
3737
return kj::mv(stream);
3838
}, [&f = *paf.fulfiller](kj::Exception e) {
3939
KJ_LOG(WARNING, "failed to connect to local database", e);
40-
f.fulfill(kj::cp(e));
40+
f.fulfill(e.clone());
4141
return kj::mv(e);
4242
}).attach(kj::mv(paf.fulfiller)));
4343

src/workerd/api/queue.c++

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ StartQueueEventResponse startQueueEvent(EventTarget& globalEventTarget,
774774
t.setReturn(context.now());
775775
}
776776
}, [event = event.addRef()](kj::Exception&& e) mutable {
777-
event->setCompletionStatus(QueueEvent::CompletedWithError{kj::cp(e)});
777+
event->setCompletionStatus(QueueEvent::CompletedWithError{e.clone()});
778778
return kj::mv(e);
779779
});
780780
if (FeatureFlags::get(js).getQueueConsumerNoWaitForWaitUntil()) {

src/workerd/api/queue.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,10 @@ class QueueEvent final: public ExtendableEvent {
354354
using CompletionStatus = kj::OneOf<Incomplete, CompletedSuccessfully, CompletedWithError>;
355355

356356
void setCompletionStatus(CompletionStatus status) {
357-
completionStatus = status;
357+
completionStatus = kj::mv(status);
358358
}
359359

360-
CompletionStatus getCompletionStatus() const {
360+
const CompletionStatus& getCompletionStatus() const {
361361
return completionStatus;
362362
}
363363

src/workerd/api/sockets.c++

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,8 @@ void Socket::handleProxyStatus(jsg::Lock& js, kj::Promise<kj::Maybe<kj::Exceptio
502502
}
503503

504504
void Socket::handleProxyError(jsg::Lock& js, kj::Exception e) {
505-
resolveFulfiller(js, kj::cp(e));
506-
openedResolver.reject(js, kj::cp(e));
505+
resolveFulfiller(js, e.clone());
506+
openedResolver.reject(js, e.clone());
507507
readable->getController().cancel(js, kj::none).markAsHandled(js);
508508
writable->getController().abort(js, js.error(e.getDescription())).markAsHandled(js);
509509
}

src/workerd/api/sockets.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ class Socket: public jsg::Object {
226226

227227
void resolveFulfiller(jsg::Lock& js, kj::Maybe<kj::Exception> maybeErr) {
228228
KJ_IF_SOME(err, maybeErr) {
229-
closedResolver.reject(js, kj::cp(err));
229+
closedResolver.reject(js, err.clone());
230230
} else {
231231
closedResolver.resolve(js);
232232
}

src/workerd/api/streams/compression.c++

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,11 @@ class CompressionStreamBase: public kj::Refcounted,
320320
auto pending = kj::mv(pendingReads.front());
321321
pendingReads.pop_front();
322322
if (pending.promise->isWaiting()) {
323-
pending.promise->reject(kj::cp(reason));
323+
pending.promise->reject(reason.clone());
324324
}
325325
}
326326

327-
canceler.cancel(kj::cp(reason));
327+
canceler.cancel(reason.clone());
328328
transitionToErrored(kj::mv(reason));
329329
}
330330

@@ -374,7 +374,7 @@ class CompressionStreamBase: public kj::Refcounted,
374374
KJ_IF_SOME(exception, kj::runCatchingExceptions([this, flush, &result]() {
375375
result = context.pumpOnce(flush);
376376
})) {
377-
cancelInternal(kj::cp(exception));
377+
cancelInternal(exception.clone());
378378
kj::throwFatalException(kj::mv(exception));
379379
}
380380

@@ -412,12 +412,12 @@ class CompressionStreamBase: public kj::Refcounted,
412412
// so we need to report an error here and error the stream.
413413
if (pending.filled > 0) {
414414
auto ex = JSG_KJ_EXCEPTION(FAILED, Error, "A partially fulfilled read was canceled.");
415-
cancelInternal(kj::cp(ex));
415+
cancelInternal(ex.clone());
416416
kj::throwFatalException(kj::mv(ex));
417417
}
418418

419419
auto ex = JSG_KJ_EXCEPTION(FAILED, Error, "The pending read was canceled.");
420-
cancelInternal(kj::cp(ex));
420+
cancelInternal(ex.clone());
421421
kj::throwFatalException(kj::mv(ex));
422422
}
423423

@@ -478,7 +478,7 @@ class CompressionStreamImpl final: public CompressionStreamBase<mode> {
478478
protected:
479479
void requireActive(kj::StringPtr errorMessage) override {
480480
KJ_IF_SOME(exception, state.tryGetErrorUnsafe()) {
481-
kj::throwFatalException(kj::cp(exception));
481+
kj::throwFatalException(exception.clone());
482482
}
483483
// isActive() returns true only if in Open state (the ActiveState)
484484
JSG_REQUIRE(state.isActive(), Error, errorMessage);
@@ -500,7 +500,7 @@ class CompressionStreamImpl final: public CompressionStreamBase<mode> {
500500

501501
void throwIfException() override {
502502
KJ_IF_SOME(exception, state.tryGetErrorUnsafe()) {
503-
kj::throwFatalException(kj::cp(exception));
503+
kj::throwFatalException(exception.clone());
504504
}
505505
}
506506

0 commit comments

Comments
 (0)