Commit 773fffd6 authored by Kenton Varda's avatar Kenton Varda

Fixes #67. Also, prevent people from accidentally making MessageBuilder…

Fixes #67.  Also, prevent people from accidentally making MessageBuilder subclasses copyable/movable as brought up in issue #64.
parent 2602c0ec
......@@ -235,7 +235,6 @@ struct WirePointer {
uint32_t upper32Bits;
StructRef structRef;
// Also covers capabilities.
ListRef listRef;
......
......@@ -157,6 +157,7 @@ class MessageBuilder {
public:
MessageBuilder();
virtual ~MessageBuilder() noexcept(false);
KJ_DISALLOW_COPY(MessageBuilder);
virtual kj::ArrayPtr<word> allocateSegment(uint minimumSize) = 0;
// Allocates an array of at least the given number of words, throwing an exception or crashing if
......
......@@ -851,11 +851,11 @@ struct Payload {
struct CapDescriptor {
# **(level 1)**
#
# When an application-defined type contains an interface pointer, that pointer's encoding is the
# same as a struct pointer except that the bottom two bits are 1's instead of 0's. The pointer
# actually points to an instance of `CapDescriptor`. The runtime API should not reveal the
# CapDescriptor directly to the application, but should instead wrap it in some kind of callable
# object with methods corresponding to the interface that the capability implements.
# When an application-defined type contains an interface pointer, that pointer contains an index
# into the message's capability table -- i.e. the `capTable` part of the `Payload`. Each
# capability in the table is represented as a `CapDescriptor`. The runtime API should not reveal
# the CapDescriptor directly to the application, but should instead wrap it in some kind of
# callable object with methods corresponding to the interface that the capability implements.
#
# Keep in mind that `ExportIds` in a `CapDescriptor` are subject to reference counting. See the
# description of `ExportId`.
......
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