Browse files

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/ warning: ignoring return
    value of function declared with warn_unused_result attribute
                sandbox_obj->DefineProperty(context, key, *desc);

PR-URL: #11197
Reviewed-By: Anna Henningsen <>
Reviewed-By: Colin Ihrig <>
Reviewed-By: Daniel Bevenius <>
Reviewed-By: James M Snell <>
Reviewed-By: Michael Dawson <>
  • Loading branch information...
bnoordhuis authored and italoacasas committed Feb 6, 2017
1 parent f0eba78 commit af06f62e3567af8d4b9761c3878ca770d7bec976
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/
@@ -148,7 +148,7 @@ class ContextifyContext {
->Get(context, env()->enumerable_string()).ToLocalChecked()
- sandbox_obj->DefineProperty(context, key, *desc);
+ CHECK(sandbox_obj->DefineProperty(context, key, *desc).FromJust());
if (is_accessor) {

0 comments on commit af06f62

Please sign in to comment.