| 2588 | return callContext.getContext().newUndefined(); |
| 2589 | } |
| 2590 | |
| 2591 | // worker.postMessage(any, MessagePort[] | undefined) |
| 2592 | JSValueRef JavaScriptRuntime::workerPostMessage(JSFunctionNativeCallContext& callContext) { |
| 2593 | auto worker = thisFromCallContext<JavaScriptWorker>(callContext); |
| 2594 | if (worker != nullptr) { |
| 2595 | ScopedNativeCallActivity activity(this, worker->getSendANRAttribution()); |
| 2596 | auto data = callContext.getParameterAsValue(0); |
| 2597 | CHECK_CALL_CONTEXT(callContext); |
| 2598 | auto transfer = callContext.getParameterSize() > 1 ? callContext.getParameterAsValue(1) : Value::undefined(); |
| 2599 | CHECK_CALL_CONTEXT(callContext); |
| 2600 | auto message = JavaScriptMessage::make(data, transfer, nullptr); |
| 2601 | if (!message) { |
no test coverage detected