Exemple #1
0
void JSWorkerLocationOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
{
    JSWorkerLocation* jsWorkerLocation = jsCast<JSWorkerLocation*>(handle.get().asCell());
    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
    uncacheWrapper(world, &jsWorkerLocation->impl(), jsWorkerLocation);
    jsWorkerLocation->releaseImpl();
}
Exemple #2
0
bool JSWorkerLocationOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
    JSWorkerLocation* jsWorkerLocation = jsCast<JSWorkerLocation*>(handle.get().asCell());
    if (!isObservable(jsWorkerLocation))
        return false;
    WorkerLocation* root = &jsWorkerLocation->impl();
    return visitor.containsOpaqueRoot(root);
}
Exemple #3
0
JSValue jsWorkerLocationHash(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSWorkerLocation* castedThis = static_cast<JSWorkerLocation*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    WorkerLocation* imp = static_cast<WorkerLocation*>(castedThis->impl());
    JSValue result = jsString(exec, imp->hash());
    return result;
}
Exemple #4
0
EncodedJSValue jsWorkerLocationConstructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue, PropertyName)
{
    JSWorkerLocation* domObject = jsDynamicCast<JSWorkerLocation*>(JSValue::decode(thisValue));
    if (!domObject)
        return throwVMTypeError(exec);
    if (!domObject)
        return throwVMTypeError(exec);
    return JSValue::encode(JSWorkerLocation::getConstructor(exec->vm(), domObject->globalObject()));
}
Exemple #5
0
EncodedJSValue jsWorkerLocationHash(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSWorkerLocation* castedThis = jsDynamicCast<JSWorkerLocation*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    WorkerLocation& impl = castedThis->impl();
    JSValue result = jsStringWithCache(exec, impl.hash());
    return JSValue::encode(result);
}
Exemple #6
0
EncodedJSValue JSC_HOST_CALL jsWorkerLocationPrototypeFunctionToString(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    JSWorkerLocation* castedThis = jsDynamicCast<JSWorkerLocation*>(thisValue);
    if (!castedThis)
        return throwVMTypeError(exec);
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSWorkerLocation::info());
    WorkerLocation& impl = castedThis->impl();

    JSC::JSValue result = jsStringWithCache(exec, impl.toString());
    return JSValue::encode(result);
}
JSValue JSC_HOST_CALL jsWorkerLocationPrototypeFunctionToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
    UNUSED_PARAM(args);
    if (!thisValue.inherits(&JSWorkerLocation::s_info))
        return throwError(exec, TypeError);
    JSWorkerLocation* castedThisObj = static_cast<JSWorkerLocation*>(asObject(thisValue));
    WorkerLocation* imp = static_cast<WorkerLocation*>(castedThisObj->impl());


    JSC::JSValue result = jsString(exec, imp->toString());
    return result;
}
Exemple #8
0
EncodedJSValue JSC_HOST_CALL jsWorkerLocationPrototypeFunctionToString(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    if (!thisValue.inherits(&JSWorkerLocation::s_info))
        return throwVMTypeError(exec);
    JSWorkerLocation* castedThis = static_cast<JSWorkerLocation*>(asObject(thisValue));
    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSWorkerLocation::s_info);
    WorkerLocation* imp = static_cast<WorkerLocation*>(castedThis->impl());


    JSC::JSValue result = jsString(exec, imp->toString());
    return JSValue::encode(result);
}
Exemple #9
0
JSValue jsWorkerLocationConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSWorkerLocation* domObject = static_cast<JSWorkerLocation*>(asObject(slotBase));
    return JSWorkerLocation::getConstructor(exec, domObject->globalObject());
}