Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: content/common/font_config_ipc_linux.cc

Issue 100253002: Don't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "content/common/font_config_ipc_linux.h" 5 #include "content/common/font_config_ipc_linux.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <sys/mman.h> 9 #include <sys/mman.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 15 matching lines...) Expand all
26 // Return a stream from the file descriptor, or NULL on failure. 26 // Return a stream from the file descriptor, or NULL on failure.
27 SkStream* StreamFromFD(int fd) { 27 SkStream* StreamFromFD(int fd) {
28 skia::RefPtr<SkData> data = skia::AdoptRef(SkData::NewFromFD(fd)); 28 skia::RefPtr<SkData> data = skia::AdoptRef(SkData::NewFromFD(fd));
29 if (!data) { 29 if (!data) {
30 return NULL; 30 return NULL;
31 } 31 }
32 return new SkMemoryStream(data.get()); 32 return new SkMemoryStream(data.get());
33 } 33 }
34 34
35 void CloseFD(int fd) { 35 void CloseFD(int fd) {
36 int err = HANDLE_EINTR(close(fd)); 36 int err = IGNORE_EINTR(close(fd));
37 DCHECK(!err); 37 DCHECK(!err);
38 } 38 }
39 39
40 FontConfigIPC::FontConfigIPC(int fd) 40 FontConfigIPC::FontConfigIPC(int fd)
41 : fd_(fd) { 41 : fd_(fd) {
42 } 42 }
43 43
44 FontConfigIPC::~FontConfigIPC() { 44 FontConfigIPC::~FontConfigIPC() {
45 CloseFD(fd_); 45 CloseFD(fd_);
46 } 46 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 return NULL; 119 return NULL;
120 } 120 }
121 121
122 SkStream* stream = StreamFromFD(result_fd); 122 SkStream* stream = StreamFromFD(result_fd);
123 CloseFD(result_fd); 123 CloseFD(result_fd);
124 return stream; 124 return stream;
125 } 125 }
126 126
127 } // namespace content 127 } // namespace content
128 128
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_helper.cc ('k') | content/common/gpu/media/exynos_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698