| 388 | |
| 389 | JSObjectSetPrototype(context, object, _functionPrototype); |
| 390 | return returnJSValueRef(object, kJSTypeObject); |
| 391 | } |
| 392 | |
| 393 | Valdi::JSValueRef JavaScriptCoreContext::onNewBool(bool boolean) { |
| 394 | return returnJSValueRef(JSValueMakeBoolean(getJSGlobalContext(), boolean), kJSTypeBoolean); |
| 395 | } |
| 396 | |
| 397 | Valdi::JSValueRef JavaScriptCoreContext::onNewNumber(int32_t number) { |
| 398 | return onNewNumber(static_cast<double>(number)); |
| 399 | } |
| 400 | |
| 401 | Valdi::JSValueRef JavaScriptCoreContext::onNewNumber(double number) { |
| 402 | auto context = getJSGlobalContext(); |
| 403 | return returnJSValueRef(JSValueMakeNumber(context, number), kJSTypeNumber); |
| 404 | } |
| 405 | |
| 406 | Valdi::JSValueRef JavaScriptCoreContext::newStringUTF8(const std::string_view& str, |
| 407 | Valdi::JSExceptionTracker& exceptionTracker) { |
nothing calls this directly
no test coverage detected