fix: check the result when calling js function (#17443)
* fix: check the result when calling js function * test: should not crash when callback returns nothing
This commit is contained in:
parent
1571461bae
commit
671533f7d2
5 changed files with 26 additions and 18 deletions
|
@ -221,7 +221,7 @@ void SpellCheckClient::SpellCheckWords(
|
|||
v8::Local<v8::Value> args[] = {mate::ConvertToV8(isolate_, words),
|
||||
templ->GetFunction(context).ToLocalChecked()};
|
||||
// Call javascript with the words and the callback function
|
||||
scope.spell_check_->Call(context, scope.provider_, 2, args).ToLocalChecked();
|
||||
scope.spell_check_->Call(context, scope.provider_, 2, args).IsEmpty();
|
||||
}
|
||||
|
||||
// Returns whether or not the given string is a contraction.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue