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

Unified Diff: runtime/vm/service.cc

Issue 2997013002: Refactor of the GetEmbedderInformation APIs (Closed)
Patch Set: Address comments Created 3 years, 4 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/include/dart_tools_api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 066354f0d59c8066470953dd4e2642609acece5f..fe24ad50bccec872c066d1292279f343b1873a33 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -3862,18 +3862,18 @@ void Service::PrintJSONForEmbedderInformation(JSONObject *jsobj) {
Dart_EmbedderInformation info = {
0, // version
NULL, // name
- 0, // max_rss
- 0 // current_rss
+ -1, // max_rss
+ -1 // current_rss
};
embedder_information_callback_(&info);
ASSERT(info.version == DART_EMBEDDER_INFORMATION_CURRENT_VERSION);
if (info.name != NULL) {
jsobj->AddProperty("_embedder", info.name);
}
- if (info.max_rss > 0) {
+ if (info.max_rss >= 0) {
jsobj->AddProperty64("_maxRSS", info.max_rss);
}
- if (info.max_rss > 0) {
+ if (info.current_rss >= 0) {
jsobj->AddProperty64("_currentRSS", info.current_rss);
}
}
« no previous file with comments | « runtime/include/dart_tools_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698