Skip to content

Commit

Permalink
Revert of PageAnimator: estimate number of documents and reserveIniti…
Browse files Browse the repository at this point in the history
…alCapacity (patchset nwjs#1 id:1 of https://codereview.chromium.org/883573003/)

Reason for revert:
Appears to be causing crashes in browser tests due to bad LocalFrame casts: http://build.chromium.org/p/chromium.webkit/builders/Linux%20Tests%20(dbg)/builds/5376/steps/content_browsertests/logs/KillingRendererClearsDescendantProxies

Original issue's description:
> PageAnimator: estimate number of documents and reserveInitialCapacity
> 
> PageAnimator::serviceScriptedAnimation is called every frame.
> The vector expansion should be kept minimal for performance.
> 
> The CL adds reserveInitialCapacity to avoid dynamic expand.
> 
> BUG=452351
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=189003

TBR=dstockwell@chromium.org,haraken@chromium.org,kouhei@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=452351

Review URL: https://codereview.chromium.org/880053002

git-svn-id: svn://svn.chromium.org/blink/trunk@189051 bbb929c8-8fbe-4397-9dbb-9b2b20218538
  • Loading branch information
leviw committed Jan 27, 2015
1 parent 66b2796 commit 1d4ade2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Source/core/page/PageAnimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime)
TemporaryChange<bool> servicing(m_servicingAnimations, true);

WillBeHeapVector<RefPtrWillBeMember<Document>> documents;
ASSERT(m_page->mainFrame());
documents.reserveInitialCapacity(m_page->mainFrame()->tree().scopedChildCount());
for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
if (frame->isLocalFrame())
documents.append(toLocalFrame(frame)->document());
Expand Down

0 comments on commit 1d4ade2

Please sign in to comment.