I fixed all the things you pointed out aside from one ugh regarding names (recorder ...
9 years, 2 months ago
(2015-03-03 23:45:48 UTC)
#2
I fixed all the things you pointed out aside from one ugh regarding names
(recorder vs record).
https://codereview.appspot.com/210160043/diff/1/external_tests/ssl_gtest/data...
File external_tests/ssl_gtest/databuffer.h (right):
https://codereview.appspot.com/210160043/diff/1/external_tests/ssl_gtest/data...
external_tests/ssl_gtest/databuffer.h:63: return Write(index, addr +
sizeof(uint32_t) - count, count);
On 2015/03/03 22:41:43, ekr-webrtc wrote:
> This code seems kind of confusing. Why not just do a for loop instead?
Now that I'm expanding the allocation on a write that runs off the end, the for
loop would have to take that into account. This isn't so bad, is it?
https://codereview.appspot.com/210160043/diff/1/external_tests/ssl_gtest/data...
external_tests/ssl_gtest/databuffer.h:73: return; // ERROR!
On 2015/03/03 22:41:43, ekr-webrtc wrote:
> Suggest assert here or have this return error.
In line with the changes to Write, I'm going to have this expand the buffer as
needed.
https://codereview.appspot.com/210160043/diff/1/external_tests/ssl_gtest/data...
external_tests/ssl_gtest/databuffer.h:76: uint8_t* old_value = data_;
On 2015/03/03 22:41:43, ekr-webrtc wrote:
> This seems like it can silently leave things in a very message up situation,
> e.g., if ins_len > len. I would suggest more error checking.
Maybe you should look at the new code. I've done all the checking on paper and
the checks here were sufficient. ins_len > len is perfectly OK (and I've used
that before).
https://codereview.appspot.com/210160043/diff/1/external_tests/ssl_gtest/data...
external_tests/ssl_gtest/databuffer.h:109: stream << std::hex <<
std::setfill('0') << std::setw(2)
On 2015/03/03 22:41:43, ekr-webrtc wrote:
> Is there a reason not to put these inserters outside the main loop?
Probably, but I tried the obvious method and at least setw fails badly, so I
left them here. Let the compiler worry about niceties like performance.
https://codereview.appspot.com/210160043/diff/1/external_tests/ssl_gtest/tls_...
File external_tests/ssl_gtest/tls_filter.cc (right):
https://codereview.appspot.com/210160043/diff/1/external_tests/ssl_gtest/tls_...
external_tests/ssl_gtest/tls_filter.cc:13: bool TlsRecordFilter::Filter(const
DataBuffer& input, DataBuffer* output) {
On 2015/03/03 22:41:44, ekr-webrtc wrote:
> I think this code would be a lot cleaner if it copied as it went rather than
> rewriting effectively in place.
Done.
https://codereview.appspot.com/210160043/diff/1/external_tests/ssl_gtest/tls_...
File external_tests/ssl_gtest/tls_parser.cc (right):
https://codereview.appspot.com/210160043/diff/1/external_tests/ssl_gtest/tls_...
external_tests/ssl_gtest/tls_parser.cc:45: memcpy(val->data(), ptr(), len);
On 2015/03/03 22:41:45, ekr-webrtc wrote:
> What are the semantics here? Merge the buffers? Perhaps comment in the header?
Actually, I should just be using Assign here.
Issue 210160043: Bug 1139082 - Refactor
(Closed)
Created 9 years, 2 months ago by mt
Modified 7 years, 9 months ago
Reviewers: ekr-rietveld
Base URL:
Comments: 76