| 334 | return checkCallAndGetValue(exceptionTracker, JS_EvalFunction(_context, retainedResult)); |
| 335 | } |
| 336 | |
| 337 | Valdi::JSValueRef QuickJSJavaScriptContext::evaluate(const std::string& script, |
| 338 | const std::string_view& sourceFilename, |
| 339 | Valdi::JSExceptionTracker& exceptionTracker) { |
| 340 | auto guard = _threadAccessChecker.guard(); |
| 341 | return checkCallAndGetValue( |
| 342 | exceptionTracker, |
| 343 | JS_Eval(_context, reinterpret_cast<const char*>(script.data()), script.size(), sourceFilename.data(), 0)); |
| 344 | } |
| 345 | |
| 346 | Valdi::JSValueRef QuickJSJavaScriptContext::evaluateNative(const std::string_view& sourceFilename, |
| 347 | Valdi::JSExceptionTracker& exceptionTracker) { |
| 348 | auto guard = _threadAccessChecker.guard(); |
| 349 | return checkCallAndGetValue(exceptionTracker, tsn_load_module(_context, sourceFilename.data())); |
| 350 | } |
| 351 |
nothing calls this directly
no test coverage detected