Skip to content

Commit af06f62

Browse files
bnoordhuisitaloacasas
authored andcommitted
src: fix -Wunused-result compiler warning
Fix a warning that was introduced in commit 67af1ad ("src: refactor CopyProperties to remove JS") from a few days ago. This particular change was suggested by me, mea culpa. Fixes the following warning: ../src/node_contextify.cc:151:13: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result] sandbox_obj->DefineProperty(context, key, *desc); PR-URL: #11197 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent f0eba78 commit af06f62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_contextify.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class ContextifyContext {
148148
desc->set_enumerable(desc_vm_context
149149
->Get(context, env()->enumerable_string()).ToLocalChecked()
150150
->BooleanValue(context).FromJust());
151-
sandbox_obj->DefineProperty(context, key, *desc);
151+
CHECK(sandbox_obj->DefineProperty(context, key, *desc).FromJust());
152152
};
153153

154154
if (is_accessor) {

0 commit comments

Comments
 (0)