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

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

Issue 2798393006: Add CHECK in PingLoaderImpl's destructor (Closed)
Patch Set: comment Created 3 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
« 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 AllowStoredCredentials); 274 AllowStoredCredentials);
275 m_loader->loadAsynchronously(wrappedRequest, this); 275 m_loader->loadAsynchronously(wrappedRequest, this);
276 276
277 // If the server never responds, FrameLoader won't be able to cancel this load 277 // If the server never responds, FrameLoader won't be able to cancel this load
278 // and we'll sit here waiting forever. Set a very generous timeout, just in 278 // and we'll sit here waiting forever. Set a very generous timeout, just in
279 // case. 279 // case.
280 m_timeout.startOneShot(60000, BLINK_FROM_HERE); 280 m_timeout.startOneShot(60000, BLINK_FROM_HERE);
281 } 281 }
282 282
283 PingLoaderImpl::~PingLoaderImpl() { 283 PingLoaderImpl::~PingLoaderImpl() {
284 if (m_loader) 284 // TODO(kinuko): Turn this to DCHECK once crbug.com/662769 is resolved.
285 m_loader->cancel(); 285 CHECK(!m_loader);
286 } 286 }
287 287
288 void PingLoaderImpl::dispose() { 288 void PingLoaderImpl::dispose() {
289 if (m_loader) { 289 if (m_loader) {
290 m_loader->cancel(); 290 m_loader->cancel();
291 m_loader = nullptr; 291 m_loader = nullptr;
292 } 292 }
293 m_timeout.stop(); 293 m_timeout.stop();
294 m_keepAlive.clear(); 294 m_keepAlive.clear();
295 } 295 }
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 bool PingLoader::sendBeacon(LocalFrame* frame, 580 bool PingLoader::sendBeacon(LocalFrame* frame,
581 int allowance, 581 int allowance,
582 const KURL& beaconURL, 582 const KURL& beaconURL,
583 Blob* data, 583 Blob* data,
584 size_t& beaconSize) { 584 size_t& beaconSize) {
585 BeaconBlob beacon(data); 585 BeaconBlob beacon(data);
586 return sendBeaconCommon(frame, allowance, beaconURL, beacon, beaconSize); 586 return sendBeaconCommon(frame, allowance, beaconURL, beacon, beaconSize);
587 } 587 }
588 588
589 } // namespace blink 589 } // 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