Is it addon must put one parameter at least?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
No file or test is named. Start by reproducing the difference between getFilesSnap() and getFilesSnap(0) in the addon example, then inspect the shown FunctionTemplate registration and related Node.js addon examples. Done means determining whether zero-argument calls are supported and documenting or correcting the example based on that finding.
Written by the indexing model from the issue text.
Description
Hi,
I got this error when I passed none paramter in my addon function:
#
# Fatal error in , line 0
# Check failed: receiver.IsJSFunction().
#
#
#
#FailureMessage Object: 0000008C4ABCEC60
1: 00007FF66745D1EF napi_wrap+113103
2: 00007FF66739334F v8::internal::wasm::JSToWasmWrapperCompilationUnit::~JSToWasmWrapperCompilationUnit+258639
3: 00007FF667DD8E64 V8_Fatal+212
4: 00007FF6679725D8 v8::internal::JSReceiver::GetCreationContext+360
5: 00007FF667BFED00 v8::Object::CreationContext+32
6: 00007FF66747D6C8 node::MakeCallback+40
7: 00007FF9B44651BF Nan::AsyncResource::runInAsyncScope+175 [E:\code\nodejs\civet\caxios\node_modules\nan\nan.h]:L612
8: 00007FF9B4465719 Nan::Callback::Call_+153 [E:\code\nodejs\civet\caxios\node_modules\nan\nan.h]:L1806
...
But if I put one parameter it was work.
await getFilesSnap() // not work
await getFilesSnap(0) // word
My C++ code like this:
exports->Set(context,
String::NewFromUtf8(isolate, getFilesSnap, v8::NewStringType::kNormal)
.ToLocalChecked(),
v8::FunctionTemplate::New(isolate, getFilesSnap, external)
->GetFunction(context).ToLocalChecked()).FromJust();
I google none of infomation about how to pass none parameter in my function. If you have any link, please tell me.
Thank you.
- Dominant language
- C++
- Stars
- 2.6k
- Forks
- 602
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nodejs/node-addon-examples
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 38/100
nodejs/node-addon-examples#585 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
nodejs/node-addon-examples#530 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
nodejs/node-addon-examples#445 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 32/100
nodejs/node-addon-examples#444 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
nodejs/node-addon-examples#381 ·
All issues in nodejs/node-addon-examples
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gazebosim/gz-sensors#662 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LadybirdBrowser/ladybird#12123 ·