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

Unified Diff: runtime/lib/mirrors.cc

Issue 1387043002: Make dart:_vmservice a proper builtin library (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/vmservice/vmservice_io.dart ('k') | runtime/lib/vmservice/client.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors.cc
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 65f7c62a632144bc2546d5bed4871b517e0a4a85..2d5145f98f9152abd735fe9c8c48c2306aa78774 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -382,9 +382,17 @@ static RawInstance* CreateLibraryMirror(const Library& lib) {
str = lib.name();
args.SetAt(1, str);
str = lib.url();
- if (str.Equals("dart:_builtin") || str.Equals("dart:_blink")) {
- // Censored library (grumble).
- return Instance::null();
+ const char* censored_libraries[] = {
+ "dart:_builtin",
+ "dart:_blink",
+ "dart:_vmservice",
+ NULL,
+ };
+ for (intptr_t i = 0; censored_libraries[i] != NULL; i++) {
+ if (str.Equals(censored_libraries[i])) {
+ // Censored library (grumble).
+ return Instance::null();
+ }
}
if (str.Equals("dart:io")) {
// Hack around dart:io being loaded into non-service isolates in Dartium.
« no previous file with comments | « runtime/bin/vmservice/vmservice_io.dart ('k') | runtime/lib/vmservice/client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698