This source file includes following definitions.
- copy
- copy
- copy
- copy
- copy
#include "config.h"
#include "platform/CrossThreadCopier.h"
#include "platform/network/ResourceError.h"
#include "platform/network/ResourceRequest.h"
#include "platform/network/ResourceResponse.h"
#include "platform/weborigin/KURL.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
CrossThreadCopierBase<false, false, KURL>::Type CrossThreadCopierBase<false, false, KURL>::copy(const KURL& url)
{
return url.copy();
}
CrossThreadCopierBase<false, false, String>::Type CrossThreadCopierBase<false, false, String>::copy(const String& str)
{
return str.isolatedCopy();
}
CrossThreadCopierBase<false, false, ResourceError>::Type CrossThreadCopierBase<false, false, ResourceError>::copy(const ResourceError& error)
{
return error.copy();
}
CrossThreadCopierBase<false, false, ResourceRequest>::Type CrossThreadCopierBase<false, false, ResourceRequest>::copy(const ResourceRequest& request)
{
return request.copyData();
}
CrossThreadCopierBase<false, false, ResourceResponse>::Type CrossThreadCopierBase<false, false, ResourceResponse>::copy(const ResourceResponse& response)
{
return response.copyData();
}
class CopierThreadSafeRefCountedTest : public ThreadSafeRefCounted<CopierThreadSafeRefCountedTest> {
};
COMPILE_ASSERT((WTF::IsSameType<
PassRefPtr<CopierThreadSafeRefCountedTest>,
CrossThreadCopier<PassRefPtr<CopierThreadSafeRefCountedTest> >::Type
>::value),
PassRefPtrTest);
COMPILE_ASSERT((WTF::IsSameType<
PassRefPtr<CopierThreadSafeRefCountedTest>,
CrossThreadCopier<RefPtr<CopierThreadSafeRefCountedTest> >::Type
>::value),
RefPtrTest);
COMPILE_ASSERT((WTF::IsSameType<
PassRefPtr<CopierThreadSafeRefCountedTest>,
CrossThreadCopier<CopierThreadSafeRefCountedTest*>::Type
>::value),
RawPointerTest);
template<typename T> struct CrossThreadCopierBase<false, false, T> {
typedef int Type;
};
class CopierRefCountedTest : public RefCounted<CopierRefCountedTest> {
};
COMPILE_ASSERT((WTF::IsSameType<
int,
CrossThreadCopier<PassRefPtr<CopierRefCountedTest> >::Type
>::value),
PassRefPtrRefCountedTest);
COMPILE_ASSERT((WTF::IsSameType<
int,
CrossThreadCopier<RefPtr<CopierRefCountedTest> >::Type
>::value),
RefPtrRefCountedTest);
COMPILE_ASSERT((WTF::IsSameType<
int,
CrossThreadCopier<CopierRefCountedTest*>::Type
>::value),
RawPointerRefCountedTest);
COMPILE_ASSERT((WTF::IsSameType<
PassOwnPtr<float>,
CrossThreadCopier<PassOwnPtr<float> >::Type
>::value),
PassOwnPtrTest);
COMPILE_ASSERT((WTF::IsSameType<
int,
CrossThreadCopier<OwnPtr<float> >::Type
>::value),
OwnPtrTest);
}