Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp

Issue 1579333003: Make the error message in WorkerThreadableLoader more developer-friendly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated kinuko's comment Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698