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

Side by Side Diff: runtime/bin/loader.h

Issue 2039383002: Add missing locking around loaders list (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | runtime/bin/loader.cc » ('j') | runtime/bin/loader.cc » ('J')
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 #ifndef BIN_LOADER_H_ 5 #ifndef BIN_LOADER_H_
6 #define BIN_LOADER_H_ 6 #define BIN_LOADER_H_
7 7
8 #include "bin/isolate_data.h" 8 #include "bin/isolate_data.h"
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "include/dart_native_api.h" 10 #include "include/dart_native_api.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // The map of active loaders. 109 // The map of active loaders.
110 static Mutex loader_infos_lock_; 110 static Mutex loader_infos_lock_;
111 static LoaderInfo* loader_infos_; 111 static LoaderInfo* loader_infos_;
112 static intptr_t loader_infos_length_; 112 static intptr_t loader_infos_length_;
113 static intptr_t loader_infos_capacity_; 113 static intptr_t loader_infos_capacity_;
114 114
115 static void AddLoader(Dart_Port port, IsolateData* data); 115 static void AddLoader(Dart_Port port, IsolateData* data);
116 static void RemoveLoader(Dart_Port port); 116 static void RemoveLoader(Dart_Port port);
117 static intptr_t LoaderIndexFor(Dart_Port port); 117 static intptr_t LoaderIndexFor(Dart_Port port);
118 static Loader* LoaderFor(Dart_Port port); 118 static Loader* LoaderFor(Dart_Port port);
119 static Loader* LoaderForLocked(Dart_Port port);
119 120
120 // This is the global callback for the native message handlers. 121 // This is the global callback for the native message handlers.
121 static void NativeMessageHandler(Dart_Port dest_port_id, 122 static void NativeMessageHandler(Dart_Port dest_port_id,
122 Dart_CObject* message); 123 Dart_CObject* message);
123 }; 124 };
124 125
125 } // namespace bin 126 } // namespace bin
126 } // namespace dart 127 } // namespace dart
127 128
128 #endif // BIN_LOADER_H_ 129 #endif // BIN_LOADER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/loader.cc » ('j') | runtime/bin/loader.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698