| 56 | } |
| 57 | |
| 58 | inline bool ScannerContext::Stream::ReadBytes(int64_t length, uint8_t** buf, |
| 59 | Status* status, bool peek) { |
| 60 | int64_t bytes_read; |
| 61 | RETURN_IF_FALSE(GetBytes(length, buf, &bytes_read, status, peek)); |
| 62 | if (UNLIKELY(length != bytes_read)) { |
| 63 | DCHECK_LT(bytes_read, length); |
| 64 | *status = ReportIncompleteRead(length, bytes_read); |
| 65 | return false; |
| 66 | } |
| 67 | return true; |
| 68 | } |
| 69 | |
| 70 | inline bool ScannerContext::Stream::SkipBytes(int64_t length, Status* status) { |
| 71 | DCHECK_GE(length, 0); |
no outgoing calls
no test coverage detected