[binder] Use AParcel_getDataSize in flow-control#27257
Merged
TaWeiTu merged 1 commit intogrpc:masterfrom Sep 11, 2021
Merged
Conversation
e0484e3 to
29ea4de
Compare
29ea4de to
4c7395d
Compare
Contributor
Author
|
Ping. |
9eac98a to
b8b0300
Compare
sifmelcara
reviewed
Sep 9, 2021
| return AParcel_getDataSize(parcel_); | ||
| } else { | ||
| gpr_log(GPR_INFO, "[Warning] AParcel_getDataSize is not available"); | ||
| return 0; |
Contributor
There was a problem hiding this comment.
This returns 0 but ReadableParcelAndroid::GetDataSize return -1?
Contributor
Author
There was a problem hiding this comment.
Done. Both return 0.
| absl::Status FakeWritableParcel::WriteInt32(int32_t data) { | ||
| data_[data_position_] = data; | ||
| SetDataPosition(data_position_ + 1).IgnoreError(); | ||
| data_size_ += 4; |
Contributor
There was a problem hiding this comment.
Probably use size_of(int32_t) instead of hardcoding the value? Same for other types
bb8a6ed to
ca9119a
Compare
sifmelcara
approved these changes
Sep 9, 2021
| absl::Status WireReaderImpl::ProcessStreamingTransactionImpl( | ||
| transaction_code_t code, const ReadableParcel* parcel, | ||
| int* cancellation_flags) { | ||
| num_incoming_bytes_ += parcel->GetDataSize(); |
Contributor
There was a problem hiding this comment.
Put it below GPR_ASSERT?
8a3bd94 to
918e4e1
Compare
918e4e1 to
ca3ae75
Compare
TaWeiTu
added a commit
to TaWeiTu/grpc
that referenced
this pull request
Sep 11, 2021
Some changes: * OnTransactCb now takes a non-const ReadableParcel* so that testing codes no longer have to rely on mutable. * Remove GetReadableParcel() interface from binder since we only sent one-way transaction and the output (readable) parcel is never used. * Remove GetDataPosition() / SetDataPosition() interfaces since they are both unused. * Some changes that should've been made to grpc#27257 but was somehow missing...
TaWeiTu
added a commit
to TaWeiTu/grpc
that referenced
this pull request
Sep 13, 2021
Some changes: * OnTransactCb now takes a non-const ReadableParcel* so that testing codes no longer have to rely on mutable. * Remove GetReadableParcel() interface from binder since we only sent one-way transaction and the output (readable) parcel is never used. * Remove GetDataPosition() / SetDataPosition() interfaces since they are both unused. * Some changes that should've been made to grpc#27257 but was somehow missing...
TaWeiTu
added a commit
to TaWeiTu/grpc
that referenced
this pull request
Sep 13, 2021
Some changes: * OnTransactCb now takes a non-const ReadableParcel* so that testing codes no longer have to rely on mutable. * Remove GetReadableParcel() interface from binder since we only sent one-way transaction and the output (readable) parcel is never used. * Remove GetDataPosition() / SetDataPosition() interfaces since they are both unused. * Some changes that should've been made to grpc#27257 but was somehow missing...
TaWeiTu
added a commit
to TaWeiTu/grpc
that referenced
this pull request
Sep 14, 2021
Some changes: * OnTransactCb now takes a non-const ReadableParcel* so that testing codes no longer have to rely on mutable. * Remove GetReadableParcel() interface from binder since we only sent one-way transaction and the output (readable) parcel is never used. * Remove GetDataPosition() / SetDataPosition() interfaces since they are both unused. * Some changes that should've been made to grpc#27257 but was somehow missing...
TaWeiTu
added a commit
that referenced
this pull request
Sep 14, 2021
Some changes: * OnTransactCb now takes a non-const ReadableParcel* so that testing codes no longer have to rely on mutable. * Remove GetReadableParcel() interface from binder since we only sent one-way transaction and the output (readable) parcel is never used. * Remove GetDataPosition() / SetDataPosition() interfaces since they are both unused. * Some changes that should've been made to #27257 but was somehow missing...
lidizheng
pushed a commit
to lidizheng/grpc
that referenced
this pull request
Sep 23, 2021
lidizheng
pushed a commit
to lidizheng/grpc
that referenced
this pull request
Sep 23, 2021
Some changes: * OnTransactCb now takes a non-const ReadableParcel* so that testing codes no longer have to rely on mutable. * Remove GetReadableParcel() interface from binder since we only sent one-way transaction and the output (readable) parcel is never used. * Remove GetDataPosition() / SetDataPosition() interfaces since they are both unused. * Some changes that should've been made to grpc#27257 but was somehow missing...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #27243.