Fix a crash on FileChooserImpl

If a renderer process is compromised, and it calls both of
FileChooserImpl::OpenFileChooser() and EnumerateChosenDirectory() via
Mojo, the browser process could crash because ResetOwner() for
the first FileChooserImpl::proxy_ instance was not called.  We
should check nullness of proxy_ before updating it.

Bug: 941008
Change-Id: Ie0c1895ec46ce78d40594b543e49e43b420af675
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1520509
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#640580}
void RenderFrameHostImpl::CreateWebSocket(
    network::mojom::WebSocketRequest request) {
  network::mojom::AuthenticationHandlerPtr auth_handler;
  GetContentClient()->browser()->WillCreateWebSocket(this, &request,
                                                     &auth_handler);

  WebSocketManager::CreateWebSocket(
      process_->GetID(), routing_id_, last_committed_origin_,
      std::move(auth_handler), std::move(request));
}

void RenderFrameHostImpl::CreateWebSocket(
    network::mojom::WebSocketRequest request) {
  network::mojom::AuthenticationHandlerPtr auth_handler;
  GetContentClient()->browser()->WillCreateWebSocket(this, &request,
                                                     &auth_handler);

  WebSocketManager::CreateWebSocket(
      process_->GetID(), routing_id_, last_committed_origin_,
      std::move(auth_handler), std::move(request));
}
