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

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 1876383003: Introduce infrastructure for tracing ScriptWrappables. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate Haraken's wonderful comments Created 4 years, 8 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
OLDNEW
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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 document.markers().removeMarkers(this); 332 document.markers().removeMarkers(this);
333 } 333 }
334 #endif 334 #endif
335 335
336 NodeRareData* Node::rareData() const 336 NodeRareData* Node::rareData() const
337 { 337 {
338 ASSERT_WITH_SECURITY_IMPLICATION(hasRareData()); 338 ASSERT_WITH_SECURITY_IMPLICATION(hasRareData());
339 return static_cast<NodeRareData*>(m_data.m_rareData); 339 return static_cast<NodeRareData*>(m_data.m_rareData);
340 } 340 }
341 341
342 NodeRareData* Node::maybeRareData() const
haraken 2016/04/13 12:26:22 maybeRareData => rareDataForTraceWrappers (to clar
Marcel Hlopko 2016/04/14 16:39:08 Removed completely, I'll write traceWrappers for N
343 {
344 return hasRareData() ? rareData() : nullptr;
345 }
346
342 NodeRareData& Node::ensureRareData() 347 NodeRareData& Node::ensureRareData()
343 { 348 {
344 if (hasRareData()) 349 if (hasRareData())
345 return *rareData(); 350 return *rareData();
346 351
347 if (isElementNode()) 352 if (isElementNode())
348 m_data.m_rareData = ElementRareData::create(m_data.m_layoutObject); 353 m_data.m_rareData = ElementRareData::create(m_data.m_layoutObject);
349 else 354 else
350 m_data.m_rareData = NodeRareData::create(m_data.m_layoutObject); 355 m_data.m_rareData = NodeRareData::create(m_data.m_layoutObject);
351 356
(...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2468 2473
2469 void showNodePath(const blink::Node* node) 2474 void showNodePath(const blink::Node* node)
2470 { 2475 {
2471 if (node) 2476 if (node)
2472 node->showNodePathForThis(); 2477 node->showNodePathForThis();
2473 else 2478 else
2474 fprintf(stderr, "Cannot showNodePath for (nil)\n"); 2479 fprintf(stderr, "Cannot showNodePath for (nil)\n");
2475 } 2480 }
2476 2481
2477 #endif 2482 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698