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

Unified Diff: Source/core/rendering/RenderBoxModelObject.cpp

Issue 869323003: Oilpan: move RenderObjects off heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review-induced improvements Created 5 years, 10 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
« no previous file with comments | « Source/core/rendering/RenderBlockFlow.cpp ('k') | Source/core/rendering/RenderFrameSet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBoxModelObject.cpp
diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp
index 86c16367ea4b217751e49bf6b0564437d1c4d482..d712c1bf3c6b5d177262657af2fdde1dd860c56c 100644
--- a/Source/core/rendering/RenderBoxModelObject.cpp
+++ b/Source/core/rendering/RenderBoxModelObject.cpp
@@ -57,8 +57,8 @@ namespace blink {
// an anonymous block (that houses other blocks) or it will be an inline flow.
// <b><i><p>Hello</p></i></b>. In this example the <i> will have a block as
// its continuation but the <b> will just have an inline as its continuation.
-typedef WillBeHeapHashMap<RawPtrWillBeMember<const RenderBoxModelObject>, RawPtrWillBeMember<RenderBoxModelObject> > ContinuationMap;
-static OwnPtrWillBePersistent<ContinuationMap>* continuationMap = 0;
+typedef HashMap<const RenderBoxModelObject*, RenderBoxModelObject*> ContinuationMap;
+static ContinuationMap* continuationMap = nullptr;
void RenderBoxModelObject::setSelectionState(SelectionState state)
{
@@ -465,18 +465,18 @@ RenderBoxModelObject* RenderBoxModelObject::continuation() const
{
if (!continuationMap)
return 0;
- return (*continuationMap)->get(this);
+ return continuationMap->get(this);
}
void RenderBoxModelObject::setContinuation(RenderBoxModelObject* continuation)
{
if (continuation) {
if (!continuationMap)
- continuationMap = new OwnPtrWillBePersistent<ContinuationMap>(adoptPtrWillBeNoop(new ContinuationMap));
- (*continuationMap)->set(this, continuation);
+ continuationMap = new ContinuationMap;
+ continuationMap->set(this, continuation);
} else {
if (continuationMap)
- (*continuationMap)->remove(this);
+ continuationMap->remove(this);
}
}
« no previous file with comments | « Source/core/rendering/RenderBlockFlow.cpp ('k') | Source/core/rendering/RenderFrameSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698