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

Side by Side Diff: third_party/WebKit/Source/core/page/FrameTree.cpp

Issue 1385323004: [Oilpan] Fix wrong usage of Vector<Frame*> in FrameTree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // from the root frame down to us. For this path to be unique, each set of s iblings must 137 // from the root frame down to us. For this path to be unique, each set of s iblings must
138 // contribute a unique name to the path, which can't collide with any HTML-a ssigned names. 138 // contribute a unique name to the path, which can't collide with any HTML-a ssigned names.
139 // We generate this path component by index in the child list along with an unlikely 139 // We generate this path component by index in the child list along with an unlikely
140 // frame name that can't be set in HTML because it collides with comment syn tax. 140 // frame name that can't be set in HTML because it collides with comment syn tax.
141 141
142 const char framePathPrefix[] = "<!--framePath "; 142 const char framePathPrefix[] = "<!--framePath ";
143 const int framePathPrefixLength = 14; 143 const int framePathPrefixLength = 14;
144 const int framePathSuffixLength = 3; 144 const int framePathSuffixLength = 3;
145 145
146 // Find the nearest parent that has a frame with a path in it. 146 // Find the nearest parent that has a frame with a path in it.
147 Vector<Frame*, 16> chain; 147 WillBeHeapVector<RawPtrWillBeMember<Frame>, 16> chain;
148 Frame* frame; 148 Frame* frame;
149 for (frame = m_thisFrame; frame; frame = frame->tree().parent()) { 149 for (frame = m_thisFrame; frame; frame = frame->tree().parent()) {
150 if (frame->tree().uniqueName().startsWith(framePathPrefix)) 150 if (frame->tree().uniqueName().startsWith(framePathPrefix))
151 break; 151 break;
152 chain.append(frame); 152 chain.append(frame);
153 } 153 }
154 StringBuilder name; 154 StringBuilder name;
155 name.append(framePathPrefix); 155 name.append(framePathPrefix);
156 if (frame) { 156 if (frame) {
157 name.append(frame->tree().uniqueName().string().substring(framePathPrefi xLength, 157 name.append(frame->tree().uniqueName().string().substring(framePathPrefi xLength,
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 { 415 {
416 if (!frame) { 416 if (!frame) {
417 printf("Null input frame\n"); 417 printf("Null input frame\n");
418 return; 418 return;
419 } 419 }
420 420
421 printFrames(frame->tree().top(), frame, 0); 421 printFrames(frame->tree().top(), frame, 0);
422 } 422 }
423 423
424 #endif 424 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698