示例#1
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;
}
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;
}
示例#3
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);
}
示例#4
0
static v8::Handle<v8::Value> toStringCallback(const v8::Arguments& args)
{
    INC_STATS("DOM.WorkerLocation.toString");
    WorkerLocation* imp = V8WorkerLocation::toNative(args.Holder());
    return v8String(imp->toString());
}
示例#5
0
static v8::Handle<v8::Value> hashAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.WorkerLocation.hash._get");
    WorkerLocation* imp = V8WorkerLocation::toNative(info.Holder());
    return v8String(imp->hash());
}
static v8::Handle<v8::Value> toStringCallback(const v8::Arguments& args)
{
    WorkerLocation* imp = V8WorkerLocation::toNative(args.Holder());
    return v8String(imp->toString(), args.GetIsolate());
}
static v8::Handle<v8::Value> hashAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    WorkerLocation* imp = V8WorkerLocation::toNative(info.Holder());
    return v8String(imp->hash(), info.GetIsolate());
}