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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 WorkerThreadableLoader::MainThreadBridge::~MainThreadBridge() | 100 WorkerThreadableLoader::MainThreadBridge::~MainThreadBridge() |
101 { | 101 { |
102 } | 102 } |
103 | 103 |
104 void WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader(ExecutionC
ontext* context, MainThreadBridge* thisPtr, PassOwnPtr<CrossThreadResourceReques
tData> requestData, ThreadableLoaderOptions options, const String& outgoingRefer
rer) | 104 void WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader(ExecutionC
ontext* context, MainThreadBridge* thisPtr, PassOwnPtr<CrossThreadResourceReques
tData> requestData, ThreadableLoaderOptions options, const String& outgoingRefer
rer) |
105 { | 105 { |
106 ASSERT(isMainThread()); | 106 ASSERT(isMainThread()); |
107 Document* document = toDocument(context); | 107 Document* document = toDocument(context); |
108 | 108 |
109 OwnPtr<ResourceRequest> request(ResourceRequest::adopt(requestData)); | 109 OwnPtr<ResourceRequest> request(ResourceRequest::adopt(requestData)); |
110 request->setHTTPReferrer(outgoingReferrer); | 110 request->setHTTPReferrer(AtomicString(outgoingReferrer)); |
111 options.requestInitiatorContext = WorkerContext; | 111 options.requestInitiatorContext = WorkerContext; |
112 thisPtr->m_mainThreadLoader = DocumentThreadableLoader::create(document, thi
sPtr, *request, options); | 112 thisPtr->m_mainThreadLoader = DocumentThreadableLoader::create(document, thi
sPtr, *request, options); |
113 if (!thisPtr->m_mainThreadLoader) { | 113 if (!thisPtr->m_mainThreadLoader) { |
114 // DocumentThreadableLoader::create may return 0 when the document loade
r has been already changed. | 114 // DocumentThreadableLoader::create may return 0 when the document loade
r has been already changed. |
115 thisPtr->didFail(ResourceError(errorDomainBlinkInternal, 0, request->url
().string(), "Can't create DocumentThreadableLoader")); | 115 thisPtr->didFail(ResourceError(errorDomainBlinkInternal, 0, request->url
().string(), "Can't create DocumentThreadableLoader")); |
116 } | 116 } |
117 } | 117 } |
118 | 118 |
119 void WorkerThreadableLoader::MainThreadBridge::mainThreadDestroy(ExecutionContex
t* context, MainThreadBridge* thisPtr) | 119 void WorkerThreadableLoader::MainThreadBridge::mainThreadDestroy(ExecutionContex
t* context, MainThreadBridge* thisPtr) |
120 { | 120 { |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 ASSERT_UNUSED(context, context->isWorkerGlobalScope()); | 262 ASSERT_UNUSED(context, context->isWorkerGlobalScope()); |
263 workerClientWrapper->didFailRedirectCheck(); | 263 workerClientWrapper->didFailRedirectCheck(); |
264 } | 264 } |
265 | 265 |
266 void WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck() | 266 void WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck() |
267 { | 267 { |
268 m_loaderProxy.postTaskForModeToWorkerGlobalScope(createCallbackTask(&workerG
lobalScopeDidFailRedirectCheck, m_workerClientWrapper), m_taskMode); | 268 m_loaderProxy.postTaskForModeToWorkerGlobalScope(createCallbackTask(&workerG
lobalScopeDidFailRedirectCheck, m_workerClientWrapper), m_taskMode); |
269 } | 269 } |
270 | 270 |
271 } // namespace WebCore | 271 } // namespace WebCore |
OLD | NEW |