From 899dd15f8f86c1c7b0b64c0d11545269737a69d0 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 23 Sep 2019 08:21:47 +0200 Subject: src: fix compiler warning in inspector_profiler.cc Currently, the following compiler warnings is generated: ../src/inspector_profiler.cc:231:5: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result] profile->Set(context, FIXED_ONE_BYTE_STRING(isolate, "source-map-cache") ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. This commit adds a .ToChecked() call to avoid the warning. PR-URL: https://github.com/nodejs/node/pull/29660 Reviewed-By: David Carlier Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater Reviewed-By: Minwoo Jung Reviewed-By: James M Snell --- src/inspector_profiler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/inspector_profiler.cc') diff --git a/src/inspector_profiler.cc b/src/inspector_profiler.cc index 1444a36bdf..b5f63b2b41 100644 --- a/src/inspector_profiler.cc +++ b/src/inspector_profiler.cc @@ -229,7 +229,7 @@ void V8CoverageConnection::WriteProfile(Local message) { // Avoid writing to disk if no source-map data: if (!source_map_cache_v->IsUndefined()) { profile->Set(context, FIXED_ONE_BYTE_STRING(isolate, "source-map-cache"), - source_map_cache_v); + source_map_cache_v).ToChecked(); } Local result_s; -- cgit v1.2.3