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

Unified Diff: sky/engine/core/script/dart_init.cc

Issue 1233463002: Ban dart:mirrors in Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | sky/sdk/lib/widgets/tabs.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/script/dart_init.cc
diff --git a/sky/engine/core/script/dart_init.cc b/sky/engine/core/script/dart_init.cc
index e4f01c36bfdca3f6770555f9344eb1f52d33ee09..5941310a508dd9b8e67346525feaac77fe4d3a21 100644
--- a/sky/engine/core/script/dart_init.cc
+++ b/sky/engine/core/script/dart_init.cc
@@ -73,16 +73,18 @@ void CreateEmptyRootLibraryIfNeeded() {
}
}
+static const char* kDartArgs[] = {
+ "--enable_mirrors=false",
#if ENABLE(DART_STRICT)
-static const char* kCheckedModeArgs[] = {"--enable_asserts",
- "--enable_type_checks",
- "--error_on_bad_type",
- "--error_on_bad_override",
+ "--enable_asserts",
+ "--enable_type_checks",
+ "--error_on_bad_type",
+ "--error_on_bad_override",
#if WTF_OS_IOS
- "--no-profile"
+ "--no-profile"
#endif
-};
#endif
+};
void UnhandledExceptionCallback(Dart_Handle error) {
LOG(ERROR) << Dart_GetError(error);
@@ -168,17 +170,9 @@ Dart_Isolate IsolateCreateCallback(const char* script_uri,
} // namespace
void InitDartVM() {
- int argc = 0;
- const char** argv = nullptr;
-
-#if ENABLE(DART_STRICT)
- argc = arraysize(kCheckedModeArgs);
- argv = kCheckedModeArgs;
-#endif
-
dart::bin::BootstrapDartIo();
- CHECK(Dart_SetVMFlags(argc, argv));
+ CHECK(Dart_SetVMFlags(arraysize(kDartArgs), kDartArgs));
// This should be called before calling Dart_Initialize.
DartDebugger::InitDebugger();
CHECK(Dart_Initialize(kDartVmIsolateSnapshotBuffer,
« no previous file with comments | « no previous file | sky/sdk/lib/widgets/tabs.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698