| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/renderer_host/sandbox_ipc_linux.h" | 5 #include "content/browser/renderer_host/sandbox_ipc_linux.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <string.h> | 10 #include <string.h> |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 if (pfds[1].revents & (POLLERR | POLLHUP)) { | 114 if (pfds[1].revents & (POLLERR | POLLHUP)) { |
| 115 break; | 115 break; |
| 116 } | 116 } |
| 117 | 117 |
| 118 if (pfds[1].revents & POLLIN) { | 118 if (pfds[1].revents & POLLIN) { |
| 119 HandleRequestFromRenderer(browser_socket_); | 119 HandleRequestFromRenderer(browser_socket_); |
| 120 } | 120 } |
| 121 } | 121 } |
| 122 | 122 |
| 123 if (blink_platform_impl_) | 123 if (blink_platform_impl_) |
| 124 blink::shutdownWithoutV8(); | 124 blink::Platform::shutdown(); |
| 125 | 125 |
| 126 VLOG(1) << "SandboxIPCHandler stopping."; | 126 VLOG(1) << "SandboxIPCHandler stopping."; |
| 127 } | 127 } |
| 128 | 128 |
| 129 void SandboxIPCHandler::HandleRequestFromRenderer(int fd) { | 129 void SandboxIPCHandler::HandleRequestFromRenderer(int fd) { |
| 130 std::vector<base::ScopedFD> fds; | 130 std::vector<base::ScopedFD> fds; |
| 131 | 131 |
| 132 // A FontConfigIPC::METHOD_MATCH message could be kMaxFontFamilyLength | 132 // A FontConfigIPC::METHOD_MATCH message could be kMaxFontFamilyLength |
| 133 // bytes long (this is the largest message type). | 133 // bytes long (this is the largest message type). |
| 134 // 128 bytes padding are necessary so recvmsg() does not return MSG_TRUNC | 134 // 128 bytes padding are necessary so recvmsg() does not return MSG_TRUNC |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 if (IGNORE_EINTR(close(lifeline_fd_)) < 0) | 440 if (IGNORE_EINTR(close(lifeline_fd_)) < 0) |
| 441 PLOG(ERROR) << "close"; | 441 PLOG(ERROR) << "close"; |
| 442 if (IGNORE_EINTR(close(browser_socket_)) < 0) | 442 if (IGNORE_EINTR(close(browser_socket_)) < 0) |
| 443 PLOG(ERROR) << "close"; | 443 PLOG(ERROR) << "close"; |
| 444 } | 444 } |
| 445 | 445 |
| 446 void SandboxIPCHandler::EnsureWebKitInitialized() { | 446 void SandboxIPCHandler::EnsureWebKitInitialized() { |
| 447 if (blink_platform_impl_) | 447 if (blink_platform_impl_) |
| 448 return; | 448 return; |
| 449 blink_platform_impl_.reset(new BlinkPlatformImpl); | 449 blink_platform_impl_.reset(new BlinkPlatformImpl); |
| 450 blink::initializeWithoutV8(blink_platform_impl_.get()); | 450 blink::Platform::initialize(blink_platform_impl_.get()); |
| 451 } | 451 } |
| 452 | 452 |
| 453 } // namespace content | 453 } // namespace content |
| OLD | NEW |