ACCESS_VIOLATION exception

When IPC::Message is constructed from empty data, it has invalid state.

Attempt to access its header (e.g. calling type() method) leads to

ACCESS_VIOLATION exception because header_ is nullptr at this time.

Change-Id: Id58df83d49d4de5f3d459c600abdecc76da36ecc

Bug: 793749
Change-Id: Id58df83d49d4de5f3d459c600abdecc76da36ecc
Reviewed-on: https://chromium-review.googlesource.com/800076
Commit-Queue: danakj <[email protected]>
Reviewed-by: John Abd-El-Malek <[email protected]>
Reviewed-by: danakj <[email protected]>
Reviewed-by: Ken Rockot <[email protected]>
Reviewed-by: Tom Sepez <[email protected]>
Cr-Commit-Position: refs/heads/master@{#525754}
diff --git a/ipc/ipc_channel_mojo.h b/ipc/ipc_channel_mojo.h
index 340d80c..aa6ba435 100644
--- a/ipc/ipc_channel_mojo.h
+++ b/ipc/ipc_channel_mojo.h
@@ -89,6 +89,7 @@
   // MessagePipeReader::Delegate
   void OnPeerPidReceived(int32_t peer_pid) override;
   void OnMessageReceived(const Message& message) override;
+  void OnBrokenDataReceived() override;
   void OnPipeError() override;
   void OnAssociatedInterfaceRequest(
       const std::string& name,