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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 ASSERT(isMainThread()); | 140 ASSERT(isMainThread()); |
141 Document* document = toDocument(context); | 141 Document* document = toDocument(context); |
142 | 142 |
143 ResourceRequest request(requestData.get()); | 143 ResourceRequest request(requestData.get()); |
144 if (!request.didSetHTTPReferrer()) | 144 if (!request.didSetHTTPReferrer()) |
145 request.setHTTPReferrer(SecurityPolicy::generateReferrer(referrerPolicy,
request.url(), outgoingReferrer)); | 145 request.setHTTPReferrer(SecurityPolicy::generateReferrer(referrerPolicy,
request.url(), outgoingReferrer)); |
146 resourceLoaderOptions.requestInitiatorContext = WorkerContext; | 146 resourceLoaderOptions.requestInitiatorContext = WorkerContext; |
147 m_mainThreadLoader = DocumentThreadableLoader::create(*document, this, reque
st, options, resourceLoaderOptions); | 147 m_mainThreadLoader = DocumentThreadableLoader::create(*document, this, reque
st, options, resourceLoaderOptions); |
148 if (!m_mainThreadLoader) { | 148 if (!m_mainThreadLoader) { |
149 // DocumentThreadableLoader::create may return 0 when the document loade
r has been already changed. | 149 // DocumentThreadableLoader::create may return 0 when the document loade
r has been already changed. |
150 didFail(ResourceError(errorDomainBlinkInternal, 0, request.url().string(
), "Can't create DocumentThreadableLoader")); | 150 didFail(ResourceError(errorDomainBlinkInternal, 0, request.url().string(
), "The parent document page has been unloaded.")); |
151 } | 151 } |
152 } | 152 } |
153 | 153 |
154 void WorkerThreadableLoader::MainThreadBridge::mainThreadDestroy(ExecutionContex
t* context) | 154 void WorkerThreadableLoader::MainThreadBridge::mainThreadDestroy(ExecutionContex
t* context) |
155 { | 155 { |
156 ASSERT(isMainThread()); | 156 ASSERT(isMainThread()); |
157 ASSERT_UNUSED(context, context->isDocument()); | 157 ASSERT_UNUSED(context, context->isDocument()); |
158 delete this; | 158 delete this; |
159 } | 159 } |
160 | 160 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 { | 265 { |
266 m_clientBridge->didFailRedirectCheck(); | 266 m_clientBridge->didFailRedirectCheck(); |
267 } | 267 } |
268 | 268 |
269 void WorkerThreadableLoader::MainThreadBridge::didReceiveResourceTiming(const Re
sourceTimingInfo& info) | 269 void WorkerThreadableLoader::MainThreadBridge::didReceiveResourceTiming(const Re
sourceTimingInfo& info) |
270 { | 270 { |
271 m_clientBridge->didReceiveResourceTiming(info); | 271 m_clientBridge->didReceiveResourceTiming(info); |
272 } | 272 } |
273 | 273 |
274 } // namespace blink | 274 } // namespace blink |
OLD | NEW |