| 115 | auto self = weakSelf.lock(); |
| 116 | if (self && self->isRunning()) { |
| 117 | auto hostRuntime = Ref<JavaScriptRuntime>(self->_hostRuntime.lock()); |
| 118 | if (hostRuntime == nullptr) { |
| 119 | return Value::undefined(); |
| 120 | } |
| 121 | auto transfer = callContext.getParametersSize() > 1 ? callContext.getParameter(1) : Value::undefinedRef(); |
| 122 | auto message = JavaScriptMessage::make(callContext.getParameter(0), transfer, nullptr); |
| 123 | if (!message) { |
| 124 | callContext.getExceptionTracker().onError(message.moveError()); |
| 125 | return Value::undefined(); |
no test coverage detected