Commit 40107f9a authored by Kenton Varda's avatar Kenton Varda

Merge pull request #278 from dwrensha/typo

Fix some outdated comments and error messages.
parents 74c91604 b48861aa
...@@ -341,7 +341,7 @@ protected: ...@@ -341,7 +341,7 @@ protected:
// The effect of this method is undefined if: // The effect of this method is undefined if:
// - No capability client has been created pointing to this object. (This is always the case in // - No capability client has been created pointing to this object. (This is always the case in
// the server's constructor.) // the server's constructor.)
// - The capability client pointing at this object has been destoryed. (This is always the case // - The capability client pointing at this object has been destroyed. (This is always the case
// in the server's destructor.) // in the server's destructor.)
// - Multiple capability clients have been created around the same server (possible if the server // - Multiple capability clients have been created around the same server (possible if the server
// is refcounted, which is not recommended since the client itself provides refcounting). // is refcounted, which is not recommended since the client itself provides refcounting).
......
...@@ -90,8 +90,9 @@ private: ...@@ -90,8 +90,9 @@ private:
class FulfillerDisposer: public kj::Disposer { class FulfillerDisposer: public kj::Disposer {
// Hack: TwoPartyVatNetwork is both a VatNetwork and a VatNetwork::Connection. When the RPC // Hack: TwoPartyVatNetwork is both a VatNetwork and a VatNetwork::Connection. When the RPC
// system detects (or initiates) a disconnection, it drops its reference to the Connection. // system detects (or initiates) a disconnection, it drops its reference to the Connection.
// When all references have been dropped, then we want onDrained() to fire. So we hand out // When all references have been dropped, then we want disconnectPromise to be fulfilled.
// Own<Connection>s with this disposer attached, so that we can detect when they are dropped. // So we hand out Own<Connection>s with this disposer attached, so that we can detect when
// they are dropped.
public: public:
mutable kj::Own<kj::PromiseFulfiller<void>> fulfiller; mutable kj::Own<kj::PromiseFulfiller<void>> fulfiller;
...@@ -102,7 +103,7 @@ private: ...@@ -102,7 +103,7 @@ private:
FulfillerDisposer disconnectFulfiller; FulfillerDisposer disconnectFulfiller;
kj::Own<TwoPartyVatNetworkBase::Connection> asConnection(); kj::Own<TwoPartyVatNetworkBase::Connection> asConnection();
// Returns a pointer to this with the disposer set to drainedFulfiller. // Returns a pointer to this with the disposer set to disconnectFulfiller.
// implements Connection ----------------------------------------------------- // implements Connection -----------------------------------------------------
......
...@@ -928,7 +928,7 @@ private: ...@@ -928,7 +928,7 @@ private:
message->send(); message->send();
} }
cap = replacement->addRef(); cap = kj::mv(replacement);
isResolved = true; isResolved = true;
} }
}; };
...@@ -1275,7 +1275,7 @@ private: ...@@ -1275,7 +1275,7 @@ private:
// If we're still awaiting a return, then this request is being canceled, and we're going // If we're still awaiting a return, then this request is being canceled, and we're going
// to ignore any capabilities in the return message, so set releaseResultCaps true. If we // to ignore any capabilities in the return message, so set releaseResultCaps true. If we
// already received the return, then we've already built local proxies for the caps and // already received the return, then we've already built local proxies for the caps and
// will send Release messages when those are destoryed. // will send Release messages when those are destroyed.
builder.setReleaseResultCaps(question.isAwaitingReturn); builder.setReleaseResultCaps(question.isAwaitingReturn);
message->send(); message->send();
} }
...@@ -2390,11 +2390,11 @@ private: ...@@ -2390,11 +2390,11 @@ private:
KJ_IF_MAYBE(response, answer->redirectedResults) { KJ_IF_MAYBE(response, answer->redirectedResults) {
questionRef->fulfill(kj::mv(*response)); questionRef->fulfill(kj::mv(*response));
} else { } else {
KJ_FAIL_REQUIRE("`Return.takeFromOtherAnswer` referenced a call that did not " KJ_FAIL_REQUIRE("`Return.takeFromOtherQuestion` referenced a call that did not "
"use `sendResultsTo.yourself`.") { return; } "use `sendResultsTo.yourself`.") { return; }
} }
} else { } else {
KJ_FAIL_REQUIRE("`Return.takeFromOtherAnswer` had invalid answer ID.") { return; } KJ_FAIL_REQUIRE("`Return.takeFromOtherQuestion` had invalid answer ID.") { return; }
} }
break; break;
......
...@@ -431,7 +431,7 @@ struct Call { ...@@ -431,7 +431,7 @@ struct Call {
# Don't actually return the results to the sender. Instead, hold on to them and await # Don't actually return the results to the sender. Instead, hold on to them and await
# instructions from the sender regarding what to do with them. In particular, the sender # instructions from the sender regarding what to do with them. In particular, the sender
# may subsequently send a `Return` for some other call (which the receiver had previously made # may subsequently send a `Return` for some other call (which the receiver had previously made
# to the sender) with `takeFromOtherAnswer` set. The results from this call are then used # to the sender) with `takeFromOtherQuestion` set. The results from this call are then used
# as the results of the other call. # as the results of the other call.
# #
# When `yourself` is used, the receiver must still send a `Return` for the call, but sets the # When `yourself` is used, the receiver must still send a `Return` for the call, but sets the
......
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