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

Side by Side Diff: third_party/WebKit/Source/core/fetch/Resource.cpp

Issue 1893673004: Ensure RemoteFontFaceSource doesn't try to start a load in a detached document (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 246 }
247 247
248 DEFINE_TRACE(Resource) 248 DEFINE_TRACE(Resource)
249 { 249 {
250 visitor->trace(m_loader); 250 visitor->trace(m_loader);
251 visitor->trace(m_cacheHandler); 251 visitor->trace(m_cacheHandler);
252 } 252 }
253 253
254 void Resource::load(ResourceFetcher* fetcher) 254 void Resource::load(ResourceFetcher* fetcher)
255 { 255 {
256 // TOOD(japhet): Temporary, out of place hack to stop a top crasher.
257 // Make this more organic.
258 if (!fetcher->loadingTaskRunner())
259 return;
260
256 RELEASE_ASSERT(!m_loader); 261 RELEASE_ASSERT(!m_loader);
257 ASSERT(stillNeedsLoad()); 262 ASSERT(stillNeedsLoad());
258 m_status = Pending; 263 m_status = Pending;
259 264
260 ResourceRequest& request(m_revalidatingRequest.isNull() ? m_resourceRequest : m_revalidatingRequest); 265 ResourceRequest& request(m_revalidatingRequest.isNull() ? m_resourceRequest : m_revalidatingRequest);
261 KURL url = request.url(); 266 KURL url = request.url();
262 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC redentials); 267 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC redentials);
263 268
264 m_loader = ResourceLoader::create(fetcher, this); 269 m_loader = ResourceLoader::create(fetcher, this);
265 m_loader->start(request); 270 m_loader->start(request);
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 case Resource::Media: 1075 case Resource::Media:
1071 return "Media"; 1076 return "Media";
1072 case Resource::Manifest: 1077 case Resource::Manifest:
1073 return "Manifest"; 1078 return "Manifest";
1074 } 1079 }
1075 ASSERT_NOT_REACHED(); 1080 ASSERT_NOT_REACHED();
1076 return "Unknown"; 1081 return "Unknown";
1077 } 1082 }
1078 1083
1079 } // namespace blink 1084 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698