Skip to content

Commit

Permalink
src: fix compiler warning in inspector_profiler.cc
Browse files Browse the repository at this point in the history
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: #29660
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
danbev authored and targos committed Oct 1, 2019
1 parent 588b388 commit 64740d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inspector_profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ void V8CoverageConnection::WriteProfile(Local<String> 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<String> result_s;
Expand Down

0 comments on commit 64740d4

Please sign in to comment.