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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2428803002: Don't send loading completion callbacks for detaching frames. (Closed)
Patch Set: . Created 4 years, 2 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 2042 matching lines...) Expand 10 before | Expand all | Expand 10 after
2053 } 2053 }
2054 2054
2055 bool WebLocalFrameImpl::isLoading() const { 2055 bool WebLocalFrameImpl::isLoading() const {
2056 if (!frame() || !frame()->document()) 2056 if (!frame() || !frame()->document())
2057 return false; 2057 return false;
2058 return frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() || 2058 return frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() ||
2059 frame()->loader().provisionalDocumentLoader() || 2059 frame()->loader().provisionalDocumentLoader() ||
2060 !frame()->document()->loadEventFinished(); 2060 !frame()->document()->loadEventFinished();
2061 } 2061 }
2062 2062
2063 bool WebLocalFrameImpl::
2064 isFrameDetachedForSpecialOneOffStopTheCrashingHackBug561873() const {
2065 return !frame() || frame()->isDetaching();
2066 }
2067
2068 bool WebLocalFrameImpl::isNavigationScheduledWithin( 2063 bool WebLocalFrameImpl::isNavigationScheduledWithin(
2069 double intervalInSeconds) const { 2064 double intervalInSeconds) const {
2070 return frame() && 2065 return frame() &&
2071 frame()->navigationScheduler().isNavigationScheduledWithin( 2066 frame()->navigationScheduler().isNavigationScheduledWithin(
2072 intervalInSeconds); 2067 intervalInSeconds);
2073 } 2068 }
2074 2069
2075 void WebLocalFrameImpl::setCommittedFirstRealLoad() { 2070 void WebLocalFrameImpl::setCommittedFirstRealLoad() {
2076 DCHECK(frame()); 2071 DCHECK(frame());
2077 ensureFrameLoaderHasCommitted(frame()->loader()); 2072 ensureFrameLoaderHasCommitted(frame()->loader());
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
2380 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2375 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2381 } else if (metric == "wasAlternateProtocolAvailable") { 2376 } else if (metric == "wasAlternateProtocolAvailable") {
2382 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2377 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2383 } else if (metric == "connectionInfo") { 2378 } else if (metric == "connectionInfo") {
2384 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2379 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2385 } 2380 }
2386 UseCounter::count(frame(), feature); 2381 UseCounter::count(frame(), feature);
2387 } 2382 }
2388 2383
2389 } // namespace blink 2384 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698