| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 14f6cee commit 79b1bf5
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,4 @@ | |||
| 1 | + #include <assert.h> | ||
| 1 | 2 | #include <stdio.h> | |
| 2 | 3 | #include <node_api.h> | |
| 3 | 4 | #include "../../js-native-api/common.h" | |
@@ -29,10 +30,7 @@ void Execute(napi_env env, void* data) { | |||
| 29 | 30 | #endif | |
| 30 | 31 | carrier* c = static_cast<carrier*>(data); | |
| 31 | 32 | ||
| 32 | - if (c != &the_carrier) { | ||
| 33 | - napi_throw_type_error(env, nullptr, "Wrong data parameter to Execute."); | ||
| 34 | - return; | ||
| 35 | - } | ||
| 33 | + assert(c == &the_carrier); | ||
| 36 | 34 | ||
| 37 | 35 | c->_output = c->_input * 2; | |
| 38 | 36 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments