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

Unified Diff: runtime/vm/dart.cc

Issue 8713012: Introduce Dart_SetVMFlags API function. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Comments addressed. Created 9 years, 1 month 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/vm/dart.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart.cc
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 36d6e91a40e5b612dcae630ff70bb08064e1f3d2..39269015cfab9b4fb121fe45e0feb0e590124e99 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -23,20 +23,19 @@ namespace dart {
Isolate* Dart::vm_isolate_ = NULL;
DebugInfo* Dart::pprof_symbol_generator_ = NULL;
-bool Dart::InitOnce(int argc, const char** argv,
- Dart_IsolateCreateCallback callback) {
+bool Dart::InitOnce(Dart_IsolateCreateCallback callback) {
// TODO(iposva): Fix race condition here.
- if (vm_isolate_ != NULL) {
+ if (vm_isolate_ != NULL || !Flags::Initialized()) {
return false;
}
OS::InitOnce();
- Flags::ProcessCommandLineFlags(argc, argv);
VirtualMemory::InitOnce();
Isolate::InitOnce();
PortMap::InitOnce();
// Create the VM isolate and finish the VM initialization.
{
ASSERT(vm_isolate_ == NULL);
+ ASSERT(Flags::Initialized());
vm_isolate_ = Isolate::Init();
Zone zone(vm_isolate_);
HandleScope handle_scope(vm_isolate_);
« no previous file with comments | « runtime/vm/dart.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698