| 111 | // - close |
| 112 | // - location, https://developer.mozilla.org/en-US/docs/Web/API/WorkerLocation, only href and search are populated |
| 113 | _workerRuntime->setValueToGlobalObject(STRING_LITERAL("onmessage"), Value::undefined()); |
| 114 | auto postMessageFunc = [weakSelf](const ValueFunctionCallContext& callContext) -> Value { |
| 115 | auto self = weakSelf.lock(); |
| 116 | if (self && self->isRunning()) { |
| 117 | auto hostRuntime = Ref<JavaScriptRuntime>(self->_hostRuntime.lock()); |
| 118 | if (hostRuntime == nullptr) { |