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

Unified Diff: Source/core/dom/Document.cpp

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update OilpanExpectations 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/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index cad741aa557bb13f073105950dc6d1f627124519..a76c38edff642488c46728e2cf75f354e0c79651 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1807,7 +1807,7 @@ void Document::updateRenderTree(StyleRecalcChange change)
// Script can run below in WidgetUpdates, so protect the LocalFrame.
// FIXME: Can this still happen? How does script run inside
// UpdateSuspendScope::performDeferredWidgetTreeOperations() ?
- RefPtr<LocalFrame> protect(m_frame);
+ RefPtrWillBeRawPtr<LocalFrame> protect(m_frame);
TRACE_EVENT_BEGIN0("blink", "Document::updateRenderTree");
TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "UpdateRenderTree");
@@ -4657,12 +4657,11 @@ void Document::finishedParsing()
// Keep it alive until we are done.
RefPtrWillBeRawPtr<Document> protect(this);
- if (RefPtr<LocalFrame> f = frame()) {
+ if (RefPtrWillBeRawPtr<LocalFrame> frame = this->frame()) {
// Don't update the render tree if we haven't requested the main resource yet to avoid
// adding extra latency. Note that the first render tree update can be expensive since it
// triggers the parsing of the default stylesheets which are compiled-in.
- const bool mainResourceWasAlreadyRequested =
- m_frame->loader().stateMachine()->committedFirstRealDocumentLoad();
+ const bool mainResourceWasAlreadyRequested = frame->loader().stateMachine()->committedFirstRealDocumentLoad();
// FrameLoader::finishedParsing() might end up calling Document::implicitClose() if all
// resource loads are complete. HTMLObjectElements can start loading their resources from
@@ -4674,11 +4673,11 @@ void Document::finishedParsing()
if (mainResourceWasAlreadyRequested)
updateRenderTreeIfNeeded();
- f->loader().finishedParsing();
+ frame->loader().finishedParsing();
- TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "MarkDOMContent", "data", InspectorMarkLoadEvent::data(f.get()));
+ TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "MarkDOMContent", "data", InspectorMarkLoadEvent::data(frame.get()));
// FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeline migrates to tracing.
- InspectorInstrumentation::domContentLoadedEventFired(f.get());
+ InspectorInstrumentation::domContentLoadedEventFired(frame.get());
}
// Schedule dropping of the ElementDataCache. We keep it alive for a while after parsing finishes

Powered by Google App Engine
This is Rietveld 408576698