예제 #1
0
static RemoteObject
MakeRemoteObject(JSContext* cx, ObjectId id, HandleObject obj)
{
    return RemoteObject(id.serialize(),
                        JS::IsCallable(obj),
                        JS::IsConstructor(obj),
                        dom::IsDOMObject(obj),
                        GetRemoteObjectTag(obj));
}
예제 #2
0
static RemoteObject
MakeRemoteObject(JSContext* cx, ObjectId id, HandleObject obj)
{
    nsCString objectTag;

    nsCOMPtr<nsIRemoteTagService> service =
        do_GetService("@mozilla.org/addons/remote-tag-service;1");
    if (service) {
        RootedValue objVal(cx, ObjectValue(*obj));
        service->GetRemoteObjectTag(objVal, objectTag);
    }

    return RemoteObject(id.serialize(),
                        JS::IsCallable(obj),
                        JS::IsConstructor(obj),
                        dom::IsDOMObject(obj),
                        objectTag);
}