| OLD | NEW |
| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 if (frame == ancestor) | 210 if (frame == ancestor) |
| 211 return true; | 211 return true; |
| 212 } | 212 } |
| 213 return false; | 213 return false; |
| 214 } | 214 } |
| 215 | 215 |
| 216 DISABLE_CFI_PERF | 216 DISABLE_CFI_PERF |
| 217 Frame* FrameTree::TraverseNext(const Frame* stay_within) const { | 217 Frame* FrameTree::TraverseNext(const Frame* stay_within) const { |
| 218 Frame* child = FirstChild(); | 218 Frame* child = FirstChild(); |
| 219 if (child) { | 219 if (child) { |
| 220 ASSERT(!stay_within || child->Tree().IsDescendantOf(stay_within)); | 220 DCHECK(!stay_within || child->Tree().IsDescendantOf(stay_within)); |
| 221 return child; | 221 return child; |
| 222 } | 222 } |
| 223 | 223 |
| 224 if (this_frame_ == stay_within) | 224 if (this_frame_ == stay_within) |
| 225 return nullptr; | 225 return nullptr; |
| 226 | 226 |
| 227 Frame* sibling = NextSibling(); | 227 Frame* sibling = NextSibling(); |
| 228 if (sibling) { | 228 if (sibling) { |
| 229 ASSERT(!stay_within || sibling->Tree().IsDescendantOf(stay_within)); | 229 DCHECK(!stay_within || sibling->Tree().IsDescendantOf(stay_within)); |
| 230 return sibling; | 230 return sibling; |
| 231 } | 231 } |
| 232 | 232 |
| 233 Frame* frame = this_frame_; | 233 Frame* frame = this_frame_; |
| 234 while (!sibling && (!stay_within || frame->Tree().Parent() != stay_within)) { | 234 while (!sibling && (!stay_within || frame->Tree().Parent() != stay_within)) { |
| 235 frame = frame->Tree().Parent(); | 235 frame = frame->Tree().Parent(); |
| 236 if (!frame) | 236 if (!frame) |
| 237 return nullptr; | 237 return nullptr; |
| 238 sibling = frame->Tree().NextSibling(); | 238 sibling = frame->Tree().NextSibling(); |
| 239 } | 239 } |
| 240 | 240 |
| 241 if (frame) { | 241 if (frame) { |
| 242 ASSERT(!stay_within || !sibling || | 242 DCHECK(!stay_within || !sibling || |
| 243 sibling->Tree().IsDescendantOf(stay_within)); | 243 sibling->Tree().IsDescendantOf(stay_within)); |
| 244 return sibling; | 244 return sibling; |
| 245 } | 245 } |
| 246 | 246 |
| 247 return nullptr; | 247 return nullptr; |
| 248 } | 248 } |
| 249 | 249 |
| 250 DEFINE_TRACE(FrameTree) { | 250 DEFINE_TRACE(FrameTree) { |
| 251 visitor->Trace(this_frame_); | 251 visitor->Trace(this_frame_); |
| 252 } | 252 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 void showFrameTree(const blink::Frame* frame) { | 296 void showFrameTree(const blink::Frame* frame) { |
| 297 if (!frame) { | 297 if (!frame) { |
| 298 printf("Null input frame\n"); | 298 printf("Null input frame\n"); |
| 299 return; | 299 return; |
| 300 } | 300 } |
| 301 | 301 |
| 302 printFrames(&frame->Tree().Top(), frame, 0); | 302 printFrames(&frame->Tree().Top(), frame, 0); |
| 303 } | 303 } |
| 304 | 304 |
| 305 #endif | 305 #endif |
| OLD | NEW |