JSValue JSC_HOST_CALL jsWorkerPrototypeFunctionPostMessage(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); if (!thisValue.inherits(&JSWorker::s_info)) return throwError(exec, TypeError); JSWorker* castedThisObj = static_cast<JSWorker*>(asObject(thisValue)); return castedThisObj->postMessage(exec, args); }
EncodedJSValue JSC_HOST_CALL jsWorkerPrototypeFunctionPostMessage(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSWorker::s_info)) return throwVMTypeError(exec); JSWorker* castedThis = static_cast<JSWorker*>(asObject(thisValue)); ASSERT_GC_OBJECT_INHERITS(castedThis, &JSWorker::s_info); return JSValue::encode(castedThis->postMessage(exec)); }