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

Unified Diff: runtime/lib/vmservice.cc

Issue 1678203002: Remove more feature in product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/lib/timeline.cc ('k') | runtime/observatory/tests/service/service.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/vmservice.cc
diff --git a/runtime/lib/vmservice.cc b/runtime/lib/vmservice.cc
index 6a2053feca072588921119d17a28c462b291b1cd..c18b8eca73d6831f2846e632971befba4f87b547 100644
--- a/runtime/lib/vmservice.cc
+++ b/runtime/lib/vmservice.cc
@@ -25,6 +25,7 @@ static uint8_t* allocator(uint8_t* ptr, intptr_t old_size, intptr_t new_size) {
}
+#ifndef PRODUCT
class RegisterRunningIsolatesVisitor : public IsolateVisitor {
public:
explicit RegisterRunningIsolatesVisitor(Thread* thread)
@@ -79,9 +80,12 @@ class RegisterRunningIsolatesVisitor : public IsolateVisitor {
Function& register_function_;
Isolate* service_isolate_;
};
-
+#endif // !PRODUCT
DEFINE_NATIVE_ENTRY(VMService_SendIsolateServiceMessage, 2) {
+ if (!FLAG_support_service) {
+ return Bool::Get(false).raw();
+ }
GET_NON_NULL_NATIVE_ARGUMENT(SendPort, sp, arguments->NativeArgAt(0));
GET_NON_NULL_NATIVE_ARGUMENT(Array, message, arguments->NativeArgAt(1));
@@ -117,14 +121,17 @@ DEFINE_NATIVE_ENTRY(VMService_OnStart, 0) {
}
// Boot the dart:vmservice library.
ServiceIsolate::BootVmServiceLibrary();
-
+ if (!FLAG_support_service) {
+ return Object::null();
+ }
+#ifndef PRODUCT
// Register running isolates with service.
RegisterRunningIsolatesVisitor register_isolates(thread);
if (FLAG_trace_service) {
OS::Print("vm-service: Registering running isolates.\n");
}
Isolate::VisitIsolates(&register_isolates);
-
+#endif
return Object::null();
}
@@ -138,6 +145,9 @@ DEFINE_NATIVE_ENTRY(VMService_OnExit, 0) {
DEFINE_NATIVE_ENTRY(VMService_OnServerAddressChange, 1) {
+ if (!FLAG_support_service) {
+ return Object::null();
+ }
GET_NATIVE_ARGUMENT(String, address, arguments->NativeArgAt(0));
if (address.IsNull()) {
ServiceIsolate::SetServerAddress(NULL);
« no previous file with comments | « runtime/lib/timeline.cc ('k') | runtime/observatory/tests/service/service.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698