Fix get_cpu_profile_timeline_rpc_test.

AddProperty64 encodes as a JSON integer, not a JSON string.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1535513002 .
This commit is contained in:
Ryan Macnak 2015-12-16 13:42:06 -08:00
parent ac170168dd
commit 55a22037fb
2 changed files with 5 additions and 4 deletions

View file

@ -31,6 +31,7 @@ var tests = [
expect(result['type'], equals('_CpuProfileTimeline'));
var isString = new isInstanceOf<String>();
var isInt = new isInstanceOf<int>();
Map frames = result['stackFrames'];
for (Map frame in frames.values) {
@ -44,9 +45,9 @@ var tests = [
List events = result['traceEvents'];
for (Map event in events) {
expect(event['ph'], equals('P'));
expect(event['pid'], isString);
expect(event['tid'], isString);
expect(event['ts'], isString);
expect(event['pid'], isInt);
expect(event['tid'], isInt);
expect(event['ts'], isInt);
expect(event['category'], equals("Dart"));
expect(frames.containsKey(event['sf']), isTrue);
}

View file

@ -3242,7 +3242,7 @@ void Service::PrintJSONForVM(JSONStream* js, bool ref) {
jsobj.AddProperty("targetCPU", CPU::Id());
jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware());
jsobj.AddProperty("version", Version::String());
jsobj.AddProperty("pid", OS::ProcessId());
jsobj.AddProperty64("pid", OS::ProcessId());
int64_t start_time_millis = (vm_isolate->start_time() /
kMicrosecondsPerMillisecond);
jsobj.AddPropertyTimeMillis("startTime", start_time_millis);