Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
146298f3
Commit
146298f3
authored
7 years ago
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Must attach reference when calling whenMoreResolved().
parent
02be7235
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
membrane.c++
c++/src/capnp/membrane.c++
+4
-2
rpc.c++
c++/src/capnp/rpc.c++
+1
-1
No files found.
c++/src/capnp/membrane.c++
View file @
146298f3
...
...
@@ -359,7 +359,8 @@ public:
// something outside the membrane later. We have to wait before we actually redirect,
// otherwise behavior will differ depending on whether the promise is resolved.
KJ_IF_MAYBE
(
p
,
whenMoreResolved
())
{
return
newLocalPromiseClient
(
kj
::
mv
(
*
p
))
->
newCall
(
interfaceId
,
methodId
,
sizeHint
);
return
newLocalPromiseClient
(
p
->
attach
(
addRef
()))
->
newCall
(
interfaceId
,
methodId
,
sizeHint
);
}
return
ClientHook
::
from
(
kj
::
mv
(
*
r
))
->
newCall
(
interfaceId
,
methodId
,
sizeHint
);
...
...
@@ -386,7 +387,8 @@ public:
// something outside the membrane later. We have to wait before we actually redirect,
// otherwise behavior will differ depending on whether the promise is resolved.
KJ_IF_MAYBE
(
p
,
whenMoreResolved
())
{
return
newLocalPromiseClient
(
kj
::
mv
(
*
p
))
->
call
(
interfaceId
,
methodId
,
kj
::
mv
(
context
));
return
newLocalPromiseClient
(
p
->
attach
(
addRef
()))
->
call
(
interfaceId
,
methodId
,
kj
::
mv
(
context
));
}
return
ClientHook
::
from
(
kj
::
mv
(
*
r
))
->
call
(
interfaceId
,
methodId
,
kj
::
mv
(
context
));
...
...
This diff is collapsed.
Click to expand it.
c++/src/capnp/rpc.c++
View file @
146298f3
...
...
@@ -2394,7 +2394,7 @@ private:
kj
::
Own
<
ClientHook
>
resolvedCap
)
{
auto
vpap
=
startCall
(
interfaceId
,
methodId
,
kj
::
mv
(
resolvedCap
),
kj
::
mv
(
context
));
return
kj
::
tuple
(
kj
::
mv
(
vpap
.
promise
),
kj
::
mv
(
vpap
.
pipeline
));
})).
attach
(
addRef
(
*
this
)).
split
();
})).
attach
(
addRef
(
*
this
)
,
kj
::
mv
(
capability
)
).
split
();
return
{
kj
::
mv
(
kj
::
get
<
0
>
(
promises
)),
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment