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

Side by Side Diff: runtime/vm/dart_api_impl.h

Issue 1640853004: Support 'dart.library.X' env variables in the VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rebase and fix typo. Created 4 years, 9 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/lib/string.cc ('k') | runtime/vm/dart_api_impl.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 VM_DART_API_IMPL_H_ 5 #ifndef VM_DART_API_IMPL_H_
6 #define VM_DART_API_IMPL_H_ 6 #define VM_DART_API_IMPL_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/native_arguments.h" 9 #include "vm/native_arguments.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } 253 }
254 static void SetIntegerReturnValue(NativeArguments* args, int64_t retval) { 254 static void SetIntegerReturnValue(NativeArguments* args, int64_t retval) {
255 args->SetReturnUnsafe(Integer::New(retval)); 255 args->SetReturnUnsafe(Integer::New(retval));
256 } 256 }
257 static void SetDoubleReturnValue(NativeArguments* args, double retval) { 257 static void SetDoubleReturnValue(NativeArguments* args, double retval) {
258 args->SetReturnUnsafe(Double::New(retval)); 258 args->SetReturnUnsafe(Double::New(retval));
259 } 259 }
260 static void SetWeakHandleReturnValue(NativeArguments* args, 260 static void SetWeakHandleReturnValue(NativeArguments* args,
261 Dart_WeakPersistentHandle retval); 261 Dart_WeakPersistentHandle retval);
262 262
263 static RawString* CallEnvironmentCallback(Thread* thread, 263 static RawString* GetEnvironmentValue(Thread* thread, const String& name);
264 const String& name);
265 264
266 private: 265 private:
267 static Dart_Handle InitNewHandle(Thread* thread, RawObject* raw); 266 static Dart_Handle InitNewHandle(Thread* thread, RawObject* raw);
268 267
268 static RawString* CallEnvironmentCallback(Thread* thread, const String& name);
269
269 // Thread local key used by the API. Currently holds the current 270 // Thread local key used by the API. Currently holds the current
270 // ApiNativeScope if any. 271 // ApiNativeScope if any.
271 static ThreadLocalKey api_native_key_; 272 static ThreadLocalKey api_native_key_;
272 static Dart_Handle true_handle_; 273 static Dart_Handle true_handle_;
273 static Dart_Handle false_handle_; 274 static Dart_Handle false_handle_;
274 static Dart_Handle null_handle_; 275 static Dart_Handle null_handle_;
275 static Dart_Handle empty_string_handle_; 276 static Dart_Handle empty_string_handle_;
276 277
277 friend class ApiNativeScope; 278 friend class ApiNativeScope;
278 }; 279 };
(...skipping 17 matching lines...) Expand all
296 return Api::NewError("%s: Cannot load after Dart_Precompile", \ 297 return Api::NewError("%s: Cannot load after Dart_Precompile", \
297 CURRENT_FUNC); \ 298 CURRENT_FUNC); \
298 } \ 299 } \
299 300
300 #define ASSERT_CALLBACK_STATE(thread) \ 301 #define ASSERT_CALLBACK_STATE(thread) \
301 ASSERT(thread->no_callback_scope_depth() == 0) 302 ASSERT(thread->no_callback_scope_depth() == 0)
302 303
303 } // namespace dart. 304 } // namespace dart.
304 305
305 #endif // VM_DART_API_IMPL_H_ 306 #endif // VM_DART_API_IMPL_H_
OLDNEW
« no previous file with comments | « runtime/lib/string.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698