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

Unified Diff: Source/core/loader/DocumentLoader.cpp

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/loader/DocumentLoader.cpp
diff --git a/Source/core/loader/DocumentLoader.cpp b/Source/core/loader/DocumentLoader.cpp
index ef596d4d847cc94cf6ca486b6eb50dc93ebb79eb..3d2654b342b11525be7de25a80c33e7fca760749 100644
--- a/Source/core/loader/DocumentLoader.cpp
+++ b/Source/core/loader/DocumentLoader.cpp
@@ -37,6 +37,9 @@
#include "core/fetch/MemoryCache.h"
#include "core/fetch/ResourceFetcher.h"
#include "core/fetch/ResourceLoader.h"
+#include "core/frame/LocalDOMWindow.h"
+#include "core/frame/LocalFrame.h"
+#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/html/HTMLFrameOwnerElement.h"
#include "core/html/parser/TextResourceDecoder.h"
#include "core/inspector/InspectorInstrumentation.h"
@@ -44,9 +47,6 @@
#include "core/loader/FrameLoaderClient.h"
#include "core/loader/UniqueIdentifier.h"
#include "core/loader/appcache/ApplicationCacheHost.h"
-#include "core/frame/LocalDOMWindow.h"
-#include "core/frame/LocalFrame.h"
-#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/page/FrameTree.h"
#include "core/page/Page.h"
#include "core/frame/Settings.h"
@@ -179,7 +179,7 @@ void DocumentLoader::mainReceivedError(const ResourceError& error)
// but not loads initiated by child frames' data sources -- that's the WebFrame's job.
void DocumentLoader::stopLoading()
{
- RefPtr<LocalFrame> protectFrame(m_frame);
+ RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame);
RefPtr<DocumentLoader> protectLoader(this);
// In some rare cases, calling FrameLoader::stopLoading could cause isLoading() to return false.
@@ -546,7 +546,7 @@ void DocumentLoader::dataReceived(Resource* resource, const char* data, int leng
// Both unloading the old page and parsing the new page may execute JavaScript which destroys the datasource
// by starting a new load, so retain temporarily.
- RefPtr<LocalFrame> protectFrame(m_frame);
+ RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame);
RefPtr<DocumentLoader> protectLoader(this);
m_applicationCacheHost->mainResourceDataReceived(data, length);
@@ -578,7 +578,7 @@ void DocumentLoader::appendRedirect(const KURL& url)
void DocumentLoader::detachFromFrame()
{
ASSERT(m_frame);
- RefPtr<LocalFrame> protectFrame(m_frame);
+ RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame);
RefPtr<DocumentLoader> protectLoader(this);
// It never makes sense to have a document loader that is detached from its

Powered by Google App Engine
This is Rietveld 408576698