| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 #endif | 259 #endif |
| 260 InstanceCounters::incrementCounter(InstanceCounters::NodeCounter); | 260 InstanceCounters::incrementCounter(InstanceCounters::NodeCounter); |
| 261 } | 261 } |
| 262 | 262 |
| 263 Node::~Node() | 263 Node::~Node() |
| 264 { | 264 { |
| 265 // With Oilpan, the rare data finalizer also asserts for | 265 // With Oilpan, the rare data finalizer also asserts for |
| 266 // this condition (we cannot directly access it here.) | 266 // this condition (we cannot directly access it here.) |
| 267 RELEASE_ASSERT(hasRareData() || !layoutObject()); | 267 RELEASE_ASSERT(hasRareData() || !layoutObject()); |
| 268 InstanceCounters::decrementCounter(InstanceCounters::NodeCounter); | 268 InstanceCounters::decrementCounter(InstanceCounters::NodeCounter); |
| 269 if (!hasRareData() && !hasLayoutObject() && m_data.m_computedStyle) |
| 270 m_data.m_computedStyle->deref(); |
| 269 } | 271 } |
| 270 | 272 |
| 271 NodeRareData* Node::rareData() const | 273 NodeRareData* Node::rareData() const |
| 272 { | 274 { |
| 273 ASSERT_WITH_SECURITY_IMPLICATION(hasRareData()); | 275 ASSERT_WITH_SECURITY_IMPLICATION(hasRareData()); |
| 274 return static_cast<NodeRareData*>(m_data.m_rareData); | 276 return static_cast<NodeRareData*>(m_data.m_rareData); |
| 275 } | 277 } |
| 276 | 278 |
| 277 NodeRareData& Node::ensureRareData() | 279 NodeRareData& Node::ensureRareData() |
| 278 { | 280 { |
| (...skipping 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2403 | 2405 |
| 2404 void showNodePath(const blink::Node* node) | 2406 void showNodePath(const blink::Node* node) |
| 2405 { | 2407 { |
| 2406 if (node) | 2408 if (node) |
| 2407 node->showNodePathForThis(); | 2409 node->showNodePathForThis(); |
| 2408 else | 2410 else |
| 2409 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2411 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2410 } | 2412 } |
| 2411 | 2413 |
| 2412 #endif | 2414 #endif |
| OLD | NEW |