OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #include "core/loader/WorkerThreadableLoader.h" | 31 #include "core/loader/WorkerThreadableLoader.h" |
32 | 32 |
33 #include "core/dom/CrossThreadTask.h" | 33 #include "core/dom/CrossThreadTask.h" |
34 #include "core/dom/Document.h" | 34 #include "core/dom/Document.h" |
35 #include "core/loader/DocumentThreadableLoader.h" | 35 #include "core/loader/DocumentThreadableLoader.h" |
36 #include "core/timing/WorkerGlobalScopePerformance.h" | 36 #include "core/timing/WorkerGlobalScopePerformance.h" |
37 #include "core/workers/WorkerGlobalScope.h" | 37 #include "core/workers/WorkerGlobalScope.h" |
38 #include "core/workers/WorkerLoaderProxy.h" | 38 #include "core/workers/WorkerLoaderProxy.h" |
39 #include "core/workers/WorkerThread.h" | 39 #include "core/workers/WorkerThread.h" |
40 #include "platform/CrossThreadFunctional.h" | |
41 #include "platform/WaitableEvent.h" | 40 #include "platform/WaitableEvent.h" |
42 #include "platform/heap/SafePoint.h" | 41 #include "platform/heap/SafePoint.h" |
43 #include "platform/network/ResourceError.h" | 42 #include "platform/network/ResourceError.h" |
44 #include "platform/network/ResourceRequest.h" | 43 #include "platform/network/ResourceRequest.h" |
45 #include "platform/network/ResourceResponse.h" | 44 #include "platform/network/ResourceResponse.h" |
46 #include "platform/network/ResourceTimingInfo.h" | 45 #include "platform/network/ResourceTimingInfo.h" |
47 #include "platform/weborigin/SecurityPolicy.h" | 46 #include "platform/weborigin/SecurityPolicy.h" |
48 #include "public/platform/Platform.h" | 47 #include "public/platform/Platform.h" |
| 48 #include "wtf/Functional.h" |
49 #include "wtf/PtrUtil.h" | 49 #include "wtf/PtrUtil.h" |
50 #include "wtf/Vector.h" | 50 #include "wtf/Vector.h" |
51 #include <memory> | 51 #include <memory> |
52 | 52 |
53 namespace blink { | 53 namespace blink { |
54 | 54 |
55 static std::unique_ptr<Vector<char>> createVectorFromMemoryRegion(const char* da
ta, unsigned dataLength) | 55 static std::unique_ptr<Vector<char>> createVectorFromMemoryRegion(const char* da
ta, unsigned dataLength) |
56 { | 56 { |
57 std::unique_ptr<Vector<char>> buffer = wrapUnique(new Vector<char>(dataLengt
h)); | 57 std::unique_ptr<Vector<char>> buffer = wrapUnique(new Vector<char>(dataLengt
h)); |
58 memcpy(buffer->data(), data, dataLength); | 58 memcpy(buffer->data(), data, dataLength); |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 | 362 |
363 MutexLocker lock(m_lock); | 363 MutexLocker lock(m_lock); |
364 RELEASE_ASSERT(!m_done); | 364 RELEASE_ASSERT(!m_done); |
365 | 365 |
366 m_clientTasks.append(std::move(task)); | 366 m_clientTasks.append(std::move(task)); |
367 m_done = true; | 367 m_done = true; |
368 m_loaderDoneEvent->signal(); | 368 m_loaderDoneEvent->signal(); |
369 } | 369 } |
370 | 370 |
371 } // namespace blink | 371 } // namespace blink |
OLD | NEW |