Chromium Code Reviews| Index: third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp |
| diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp |
| index 9afc9f60b57fa4bd9e203f85f47c28d9b929b58c..c521689df9d5f0fb4b0543cf9a99e68fc23b89ed 100644 |
| --- a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp |
| +++ b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp |
| @@ -34,7 +34,8 @@ namespace { |
| // TODO(mlamouri): refactor in one common place. |
| WebPresentationClient* PresentationClient(ExecutionContext* execution_context) { |
| - ASSERT(execution_context && execution_context->IsDocument()); |
| + DCHECK(execution_context); |
| + DCHECK(execution_context->IsDocument()); |
| Document* document = ToDocument(execution_context); |
| if (!document->GetFrame()) |
| @@ -274,7 +275,8 @@ void PresentationConnection::send(const String& message, |
| void PresentationConnection::send(DOMArrayBuffer* array_buffer, |
| ExceptionState& exception_state) { |
| - ASSERT(array_buffer && array_buffer->Buffer()); |
| + DCHECK(array_buffer); |
| + DCHECK(array_buffer->Buffer()); |
| if (!CanSendMessage(exception_state)) |
| return; |
| @@ -476,8 +478,9 @@ void PresentationConnection::DidClose() { |
| } |
| void PresentationConnection::DidFinishLoadingBlob(DOMArrayBuffer* buffer) { |
| - ASSERT(!messages_.IsEmpty() && messages_.front()->type == kMessageTypeBlob); |
| - ASSERT(buffer && buffer->Buffer()); |
| + DCHECK(!messages_.IsEmpty() && messages_.front()->type == kMessageTypeBlob); |
|
tkent
2017/05/12 09:04:37
Split this into two DCHECKs
|
| + DCHECK(buffer); |
| + DCHECK(buffer->Buffer()); |
| // Send the loaded blob immediately here and continue processing the queue. |
| WebPresentationClient* client = PresentationClient(GetExecutionContext()); |
| if (client) { |
| @@ -492,7 +495,8 @@ void PresentationConnection::DidFinishLoadingBlob(DOMArrayBuffer* buffer) { |
| void PresentationConnection::DidFailLoadingBlob( |
| FileError::ErrorCode error_code) { |
| - ASSERT(!messages_.IsEmpty() && messages_.front()->type == kMessageTypeBlob); |
| + DCHECK(!messages_.IsEmpty()); |
| + DCHECK_EQ(messages_.front()->type, kMessageTypeBlob); |
| // FIXME: generate error message? |
| // Ignore the current failed blob item and continue with next items. |
| messages_.pop_front(); |