Commit 02b8f4cd authored by Kenton Varda's avatar Kenton Varda

Fix GCC issues.

parent 4e386165
......@@ -57,9 +57,9 @@ public:
: exception(exception),
message(firstSegmentWordSize == 0 ? SUGGESTED_FIRST_SEGMENT_WORDS : firstSegmentWordSize) {}
RemotePromise<TypelessResults> send() override {
return RemotePromise<TypelessResults>(kj::cp(exception),
TypelessResults::Pipeline(kj::refcounted<BrokenPipeline>(exception)));
RemotePromise<ObjectPointer> send() override {
return RemotePromise<ObjectPointer>(kj::cp(exception),
ObjectPointer::Pipeline(kj::refcounted<BrokenPipeline>(exception)));
}
kj::Exception exception;
......@@ -73,10 +73,11 @@ public:
: exception(kj::Exception::Nature::PRECONDITION, kj::Exception::Durability::PERMANENT,
"", 0, kj::str(description)) {}
Request<ObjectPointer, TypelessResults> newCall(
Request<ObjectPointer, ObjectPointer> newCall(
uint64_t interfaceId, uint16_t methodId, uint firstSegmentWordSize) const override {
auto hook = kj::heap<BrokenRequest>(exception, firstSegmentWordSize);
return Request<ObjectPointer, TypelessResults>(hook->message.getRoot(), kj::mv(hook));
auto root = hook->message.getRoot();
return Request<ObjectPointer, ObjectPointer>(root, kj::mv(hook));
}
VoidPromiseAndPipeline call(uint64_t interfaceId, uint16_t methodId,
......
......@@ -162,16 +162,13 @@ protected:
private:
kj::Own<const ClientHook> hook;
template <typename, ::capnp::Kind>
friend struct ::capnp::_::PointerHelpers;
static kj::Own<const ClientHook> makeLocalClient(
kj::Own<Capability::Server>&& server, const kj::EventLoop& eventLoop);
template <typename, Kind>
friend struct _::PointerHelpers;
friend struct DynamicCapability;
friend class Orphanage;
template <typename T, Kind k>
friend struct _::PointerHelpers;
friend struct DynamicStruct;
friend struct DynamicList;
template <typename, Kind>
......
......@@ -233,9 +233,6 @@ struct ObjectPointer {
};
};
// TODO(now): delete
typedef ObjectPointer TypelessResults;
template <>
class Orphan<ObjectPointer> {
// An orphaned object of unknown type.
......
......@@ -55,7 +55,7 @@ class ThrowingDestructor: public UnwindDetector {
public:
~ThrowingDestructor() noexcept(false) {
catchExceptionsIfUnwinding([]() {
KJ_FAIL_ASSERT("bar") { break; }
KJ_FAIL_ASSERT("this is a test, not a real bug") { break; }
});
}
};
......@@ -67,7 +67,7 @@ TEST(Exception, UnwindDetector) {
});
KJ_IF_MAYBE(ex, e) {
EXPECT_EQ("bar", ex->getDescription());
EXPECT_EQ("this is a test, not a real bug", ex->getDescription());
} else {
ADD_FAILURE() << "Expected exception";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment