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

Unified Diff: runtime/bin/directory_patch.dart

Issue 1893033002: Fixes memory leak of async directory lister (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add unsupported calls 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/directory.cc ('k') | runtime/bin/directory_unsupported.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/directory_patch.dart
diff --git a/runtime/bin/directory_patch.dart b/runtime/bin/directory_patch.dart
index f8643ae30aab326d78e3a30bedbe457b391e0265..f98a52e966e57d77f457de9c00dc2381b9161351 100644
--- a/runtime/bin/directory_patch.dart
+++ b/runtime/bin/directory_patch.dart
@@ -16,3 +16,21 @@ patch class _Directory {
/* patch */ static List _list(String path, bool recursive, bool followLinks)
native "Directory_List";
}
+
+patch class _AsyncDirectoryListerOps {
+ /* patch */ factory _AsyncDirectoryListerOps(int pointer) =>
+ new _AsyncDirectoryListerOpsImpl(pointer);
+}
+
+class _AsyncDirectoryListerOpsImpl extends NativeFieldWrapperClass1
+ implements _AsyncDirectoryListerOps {
+ _AsyncDirectoryListerOpsImpl._();
+
+ factory _AsyncDirectoryListerOpsImpl(int pointer)
+ => new _AsyncDirectoryListerOpsImpl._().._setPointer(pointer);
+
+ void _setPointer(int pointer)
+ native "Directory_SetAsyncDirectoryListerPointer";
+ int getPointer()
+ native "Directory_GetAsyncDirectoryListerPointer";
+}
« no previous file with comments | « runtime/bin/directory.cc ('k') | runtime/bin/directory_unsupported.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698