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

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

Issue 1893033002: Fixes memory leak of async directory lister (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "bin/io_natives.h" 5 #include "bin/io_natives.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "bin/builtin.h" 10 #include "bin/builtin.h"
(...skipping 11 matching lines...) Expand all
22 V(Crypto_GetRandomBytes, 1) \ 22 V(Crypto_GetRandomBytes, 1) \
23 V(Directory_Exists, 1) \ 23 V(Directory_Exists, 1) \
24 V(Directory_Create, 1) \ 24 V(Directory_Create, 1) \
25 V(Directory_Current, 0) \ 25 V(Directory_Current, 0) \
26 V(Directory_SetCurrent, 1) \ 26 V(Directory_SetCurrent, 1) \
27 V(Directory_SystemTemp, 0) \ 27 V(Directory_SystemTemp, 0) \
28 V(Directory_CreateTemp, 1) \ 28 V(Directory_CreateTemp, 1) \
29 V(Directory_Delete, 2) \ 29 V(Directory_Delete, 2) \
30 V(Directory_Rename, 2) \ 30 V(Directory_Rename, 2) \
31 V(Directory_List, 3) \ 31 V(Directory_List, 3) \
32 V(Directory_GetAsyncDirectoryListerPointer, 1) \
33 V(Directory_SetAsyncDirectoryListerPointer, 2) \
32 V(EventHandler_SendData, 3) \ 34 V(EventHandler_SendData, 3) \
33 V(EventHandler_TimerMillisecondClock, 0) \ 35 V(EventHandler_TimerMillisecondClock, 0) \
34 V(File_Open, 2) \ 36 V(File_Open, 2) \
35 V(File_Exists, 1) \ 37 V(File_Exists, 1) \
36 V(File_GetFD, 1) \ 38 V(File_GetFD, 1) \
37 V(File_Close, 1) \ 39 V(File_Close, 1) \
38 V(File_ReadByte, 1) \ 40 V(File_ReadByte, 1) \
39 V(File_WriteByte, 2) \ 41 V(File_WriteByte, 2) \
40 V(File_Read, 2) \ 42 V(File_Read, 2) \
41 V(File_ReadInto, 4) \ 43 V(File_ReadInto, 4) \
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 struct NativeEntries* entry = &(IOEntries[i]); 186 struct NativeEntries* entry = &(IOEntries[i]);
185 if (reinterpret_cast<Dart_NativeFunction>(entry->function_) == nf) { 187 if (reinterpret_cast<Dart_NativeFunction>(entry->function_) == nf) {
186 return reinterpret_cast<const uint8_t*>(entry->name_); 188 return reinterpret_cast<const uint8_t*>(entry->name_);
187 } 189 }
188 } 190 }
189 return NULL; 191 return NULL;
190 } 192 }
191 193
192 } // namespace bin 194 } // namespace bin
193 } // namespace dart 195 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698