OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/nacl/browser/nacl_process_host.h" | 5 #include "components/nacl/browser/nacl_process_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 } | 679 } |
680 } else { | 680 } else { |
681 s = net::TCPListenSocket::CreateAndBind("127.0.0.1", kDebugStubPort); | 681 s = net::TCPListenSocket::CreateAndBind("127.0.0.1", kDebugStubPort); |
682 } | 682 } |
683 if (s == net::kInvalidSocket) { | 683 if (s == net::kInvalidSocket) { |
684 LOG(ERROR) << "failed to open socket for debug stub"; | 684 LOG(ERROR) << "failed to open socket for debug stub"; |
685 return net::kInvalidSocket; | 685 return net::kInvalidSocket; |
686 } | 686 } |
687 if (listen(s, 1)) { | 687 if (listen(s, 1)) { |
688 LOG(ERROR) << "listen() failed on debug stub socket"; | 688 LOG(ERROR) << "listen() failed on debug stub socket"; |
689 if (HANDLE_EINTR(close(s)) < 0) | 689 if (IGNORE_EINTR(close(s)) < 0) |
690 PLOG(ERROR) << "failed to close debug stub socket"; | 690 PLOG(ERROR) << "failed to close debug stub socket"; |
691 return net::kInvalidSocket; | 691 return net::kInvalidSocket; |
692 } | 692 } |
693 return s; | 693 return s; |
694 } | 694 } |
695 #endif | 695 #endif |
696 | 696 |
697 bool NaClProcessHost::StartNaClExecution() { | 697 bool NaClProcessHost::StartNaClExecution() { |
698 NaClBrowser* nacl_browser = NaClBrowser::GetInstance(); | 698 NaClBrowser* nacl_browser = NaClBrowser::GetInstance(); |
699 | 699 |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 process_handle.Take(), info, | 1015 process_handle.Take(), info, |
1016 base::MessageLoopProxy::current(), | 1016 base::MessageLoopProxy::current(), |
1017 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 1017 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
1018 weak_factory_.GetWeakPtr())); | 1018 weak_factory_.GetWeakPtr())); |
1019 return true; | 1019 return true; |
1020 } | 1020 } |
1021 } | 1021 } |
1022 #endif | 1022 #endif |
1023 | 1023 |
1024 } // namespace nacl | 1024 } // namespace nacl |
OLD | NEW |