@@ -62,6 +62,7 @@ std::unique_ptr<Request> Request::fromJsonThrowOnError(const std::string &str) {
62
62
makeUnique<heapProfiler::TakeHeapSnapshotRequest>},
63
63
{" Runtime.callFunctionOn" , makeUnique<runtime::CallFunctionOnRequest>},
64
64
{" Runtime.evaluate" , makeUnique<runtime::EvaluateRequest>},
65
+ {" Runtime.getHeapUsage" , makeUnique<runtime::GetHeapUsageRequest>},
65
66
{" Runtime.getProperties" , makeUnique<runtime::GetPropertiesRequest>},
66
67
{" Runtime.runIfWaitingForDebugger" ,
67
68
makeUnique<runtime::RunIfWaitingForDebuggerRequest>},
@@ -503,12 +504,19 @@ debugger::ResumeRequest::ResumeRequest(const dynamic &obj)
503
504
: Request(" Debugger.resume" ) {
504
505
assign (id, obj, " id" );
505
506
assign (method, obj, " method" );
507
+
508
+ dynamic params = obj.at (" params" );
509
+ assign (terminateOnResume, params, " terminateOnResume" );
506
510
}
507
511
508
512
dynamic debugger::ResumeRequest::toDynamic () const {
513
+ dynamic params = dynamic::object;
514
+ put (params, " terminateOnResume" , terminateOnResume);
515
+
509
516
dynamic obj = dynamic::object;
510
517
put (obj, " id" , id);
511
518
put (obj, " method" , method);
519
+ put (obj, " params" , std::move (params));
512
520
return obj;
513
521
}
514
522
@@ -897,12 +905,14 @@ heapProfiler::StopTrackingHeapObjectsRequest::StopTrackingHeapObjectsRequest(
897
905
dynamic params = obj.at (" params" );
898
906
assign (reportProgress, params, " reportProgress" );
899
907
assign (treatGlobalObjectsAsRoots, params, " treatGlobalObjectsAsRoots" );
908
+ assign (captureNumericValue, params, " captureNumericValue" );
900
909
}
901
910
902
911
dynamic heapProfiler::StopTrackingHeapObjectsRequest::toDynamic () const {
903
912
dynamic params = dynamic::object;
904
913
put (params, " reportProgress" , reportProgress);
905
914
put (params, " treatGlobalObjectsAsRoots" , treatGlobalObjectsAsRoots);
915
+ put (params, " captureNumericValue" , captureNumericValue);
906
916
907
917
dynamic obj = dynamic::object;
908
918
put (obj, " id" , id);
@@ -928,12 +938,14 @@ heapProfiler::TakeHeapSnapshotRequest::TakeHeapSnapshotRequest(
928
938
dynamic params = obj.at (" params" );
929
939
assign (reportProgress, params, " reportProgress" );
930
940
assign (treatGlobalObjectsAsRoots, params, " treatGlobalObjectsAsRoots" );
941
+ assign (captureNumericValue, params, " captureNumericValue" );
931
942
}
932
943
933
944
dynamic heapProfiler::TakeHeapSnapshotRequest::toDynamic () const {
934
945
dynamic params = dynamic::object;
935
946
put (params, " reportProgress" , reportProgress);
936
947
put (params, " treatGlobalObjectsAsRoots" , treatGlobalObjectsAsRoots);
948
+ put (params, " captureNumericValue" , captureNumericValue);
937
949
938
950
dynamic obj = dynamic::object;
939
951
put (obj, " id" , id);
@@ -1030,6 +1042,26 @@ void runtime::EvaluateRequest::accept(RequestHandler &handler) const {
1030
1042
handler.handle (*this );
1031
1043
}
1032
1044
1045
+ runtime::GetHeapUsageRequest::GetHeapUsageRequest ()
1046
+ : Request(" Runtime.getHeapUsage" ) {}
1047
+
1048
+ runtime::GetHeapUsageRequest::GetHeapUsageRequest (const dynamic &obj)
1049
+ : Request(" Runtime.getHeapUsage" ) {
1050
+ assign (id, obj, " id" );
1051
+ assign (method, obj, " method" );
1052
+ }
1053
+
1054
+ dynamic runtime::GetHeapUsageRequest::toDynamic () const {
1055
+ dynamic obj = dynamic::object;
1056
+ put (obj, " id" , id);
1057
+ put (obj, " method" , method);
1058
+ return obj;
1059
+ }
1060
+
1061
+ void runtime::GetHeapUsageRequest::accept (RequestHandler &handler) const {
1062
+ handler.handle (*this );
1063
+ }
1064
+
1033
1065
runtime::GetPropertiesRequest::GetPropertiesRequest ()
1034
1066
: Request(" Runtime.getProperties" ) {}
1035
1067
@@ -1284,6 +1316,25 @@ dynamic runtime::EvaluateResponse::toDynamic() const {
1284
1316
return obj;
1285
1317
}
1286
1318
1319
+ runtime::GetHeapUsageResponse::GetHeapUsageResponse (const dynamic &obj) {
1320
+ assign (id, obj, " id" );
1321
+
1322
+ dynamic res = obj.at (" result" );
1323
+ assign (usedSize, res, " usedSize" );
1324
+ assign (totalSize, res, " totalSize" );
1325
+ }
1326
+
1327
+ dynamic runtime::GetHeapUsageResponse::toDynamic () const {
1328
+ dynamic res = dynamic::object;
1329
+ put (res, " usedSize" , usedSize);
1330
+ put (res, " totalSize" , totalSize);
1331
+
1332
+ dynamic obj = dynamic::object;
1333
+ put (obj, " id" , id);
1334
+ put (obj, " result" , std::move (res));
1335
+ return obj;
1336
+ }
1337
+
1287
1338
runtime::GetPropertiesResponse::GetPropertiesResponse (const dynamic &obj) {
1288
1339
assign (id, obj, " id" );
1289
1340
0 commit comments