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

Side by Side Diff: Source/core/dom/TreeScope.cpp

Issue 13973026: remove memoryinstrumentation Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove the rest part of MemoryInstrumentation Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/TreeScope.h ('k') | Source/core/dom/WebCoreMemoryInstrumentation.h » ('j') | 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) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 Google Inc. All Rights Reserved.
3 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 if (node == rootNode()) 375 if (node == rootNode())
376 return targetStack.last(); 376 return targetStack.last();
377 if (node->isShadowRoot()) { 377 if (node->isShadowRoot()) {
378 ASSERT(!targetStack.isEmpty()); 378 ASSERT(!targetStack.isEmpty());
379 targetStack.removeLast(); 379 targetStack.removeLast();
380 } 380 }
381 } 381 }
382 return 0; 382 return 0;
383 } 383 }
384 384
385 void TreeScope::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
386 {
387 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
388 info.addMember(m_rootNode, "rootNode");
389 info.addMember(m_parentTreeScope, "parentTreeScope");
390 info.addMember(m_elementsById, "elementsById");
391 info.addMember(m_imageMapsByName, "imageMapsByName");
392 info.addMember(m_labelsByForAttribute, "labelsByForAttribute");
393 info.addMember(m_idTargetObserverRegistry, "idTargetObserverRegistry");
394 info.addMember(m_selection, "selection");
395 info.addMember(m_documentScope, "documentScope");
396
397 }
398
399 static void listTreeScopes(Node* node, Vector<TreeScope*, 5>& treeScopes) 385 static void listTreeScopes(Node* node, Vector<TreeScope*, 5>& treeScopes)
400 { 386 {
401 while (true) { 387 while (true) {
402 treeScopes.append(node->treeScope()); 388 treeScopes.append(node->treeScope());
403 Element* ancestor = node->shadowHost(); 389 Element* ancestor = node->shadowHost();
404 if (!ancestor) 390 if (!ancestor)
405 break; 391 break;
406 node = ancestor; 392 node = ancestor;
407 } 393 }
408 } 394 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 #endif 429 #endif
444 430
445 int TreeScope::refCount() const 431 int TreeScope::refCount() const
446 { 432 {
447 if (Node* root = rootNode()) 433 if (Node* root = rootNode())
448 return root->refCount(); 434 return root->refCount();
449 return 0; 435 return 0;
450 } 436 }
451 437
452 } // namespace WebCore 438 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/TreeScope.h ('k') | Source/core/dom/WebCoreMemoryInstrumentation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698