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

Side by Side Diff: runtime/bin/file_fuchsia.cc

Issue 2694103004: Cleanup app snapshots on isolate/vm exit. (Closed)
Patch Set: merge Created 3 years, 10 months 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
« no previous file with comments | « runtime/bin/file_android.cc ('k') | runtime/bin/file_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_FUCHSIA) 6 #if defined(TARGET_OS_FUCHSIA)
7 7
8 #include "bin/file.h" 8 #include "bin/file.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 intptr_t File::GetFD() { 70 intptr_t File::GetFD() {
71 return handle_->fd(); 71 return handle_->fd();
72 } 72 }
73 73
74 74
75 bool File::IsClosed() { 75 bool File::IsClosed() {
76 return handle_->fd() == kClosedFd; 76 return handle_->fd() == kClosedFd;
77 } 77 }
78 78
79 79
80 void* File::Map(MapType type, int64_t position, int64_t length) { 80 MappedMemory* File::Map(MapType type, int64_t position, int64_t length) {
81 UNIMPLEMENTED(); 81 UNIMPLEMENTED();
82 return NULL; 82 return NULL;
83 } 83 }
84 84
85 85
86 void MappedMemory::Unmap() {
87 UNIMPLEMENTED();
88 }
89
90
86 int64_t File::Read(void* buffer, int64_t num_bytes) { 91 int64_t File::Read(void* buffer, int64_t num_bytes) {
87 ASSERT(handle_->fd() >= 0); 92 ASSERT(handle_->fd() >= 0);
88 return NO_RETRY_EXPECTED(read(handle_->fd(), buffer, num_bytes)); 93 return NO_RETRY_EXPECTED(read(handle_->fd(), buffer, num_bytes));
89 } 94 }
90 95
91 96
92 int64_t File::Write(const void* buffer, int64_t num_bytes) { 97 int64_t File::Write(const void* buffer, int64_t num_bytes) {
93 ASSERT(handle_->fd() >= 0); 98 ASSERT(handle_->fd() >= 0);
94 return NO_RETRY_EXPECTED(write(handle_->fd(), buffer, num_bytes)); 99 return NO_RETRY_EXPECTED(write(handle_->fd(), buffer, num_bytes));
95 } 100 }
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 return ((file_1_info.st_ino == file_2_info.st_ino) && 551 return ((file_1_info.st_ino == file_2_info.st_ino) &&
547 (file_1_info.st_dev == file_2_info.st_dev)) 552 (file_1_info.st_dev == file_2_info.st_dev))
548 ? File::kIdentical 553 ? File::kIdentical
549 : File::kDifferent; 554 : File::kDifferent;
550 } 555 }
551 556
552 } // namespace bin 557 } // namespace bin
553 } // namespace dart 558 } // namespace dart
554 559
555 #endif // defined(TARGET_OS_FUCHSIA) 560 #endif // defined(TARGET_OS_FUCHSIA)
OLDNEW
« no previous file with comments | « runtime/bin/file_android.cc ('k') | runtime/bin/file_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698