| 94 | return _allowSyncCall; |
| 95 | } |
| 96 | |
| 97 | Value ValueFunctionWithJSValue::doJsCall(JavaScriptEntryParameters& jsEntry, |
| 98 | const Value* parameters, |
| 99 | size_t parametersSize, |
| 100 | ExceptionTracker* exceptionTracker, |
| 101 | bool ignoreRetValue) { |
| 102 | VALDI_TRACE_META("Valdi.callJsFunction", getFunctionName()); |
| 103 | |
| 104 | auto jsValue = getJsValue(jsEntry.jsContext, jsEntry.exceptionTracker); |
| 105 | if (!jsEntry.exceptionTracker) { |
| 106 | if (_ignoreIfValdiContextIsDestroyed) { |
| 107 | jsEntry.exceptionTracker.clearError(); |
| 108 | } else if (exceptionTracker != nullptr) { |
| 109 | exceptionTracker->onError(jsEntry.exceptionTracker.extractError()); |
| 110 | } |
| 111 | return Value::undefined(); |
| 112 | } |
| 113 | |
| 114 | auto retValue = callJsFunction(jsEntry, jsValue, parameters, parametersSize, ignoreRetValue); |
| 115 | if (!jsEntry.exceptionTracker && exceptionTracker != nullptr) { |
| 116 | exceptionTracker->onError(jsEntry.exceptionTracker.extractError()); |
| 117 | } |
| 118 | |
| 119 | if (_isSingleCall) { |
| 120 | clearJsValue(jsEntry.jsContext); |
| 121 | } |
| 122 | |
| 123 | return retValue; |
| 124 | } |
| 125 | |
| 126 | void ValueFunctionWithJSValue::setIgnoreIfValdiContextIsDestroyed(bool ignoreIfValdiContextIsDestroyed) { |
no test coverage detected