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

Side by Side Diff: Source/core/dom/StaticNodeList.h

Issue 64203002: Report size of the external memory to V8 in StaticNodeList (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updates Created 7 years, 1 month 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 | « no previous file | Source/core/dom/StaticNodeList.cpp » ('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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 22 matching lines...) Expand all
33 #include "wtf/PassRefPtr.h" 33 #include "wtf/PassRefPtr.h"
34 #include "wtf/RefPtr.h" 34 #include "wtf/RefPtr.h"
35 #include "wtf/Vector.h" 35 #include "wtf/Vector.h"
36 36
37 namespace WebCore { 37 namespace WebCore {
38 38
39 class Node; 39 class Node;
40 40
41 class StaticNodeList FINAL : public NodeList { 41 class StaticNodeList FINAL : public NodeList {
42 public: 42 public:
43 static PassRefPtr<StaticNodeList> adopt(Vector<RefPtr<Node> >& nodes) 43 static PassRefPtr<StaticNodeList> adopt(Vector<RefPtr<Node> >&);
44 {
45 RefPtr<StaticNodeList> nodeList = adoptRef(new StaticNodeList);
46 nodeList->m_nodes.swap(nodes);
47 return nodeList.release();
48 }
49 44
50 static PassRefPtr<StaticNodeList> createEmpty() 45 static PassRefPtr<StaticNodeList> createEmpty()
51 { 46 {
52 return adoptRef(new StaticNodeList); 47 return adoptRef(new StaticNodeList);
53 } 48 }
54 49
50 virtual ~StaticNodeList();
51
55 virtual unsigned length() const OVERRIDE; 52 virtual unsigned length() const OVERRIDE;
56 virtual Node* item(unsigned index) const OVERRIDE; 53 virtual Node* item(unsigned index) const OVERRIDE;
57 virtual Node* namedItem(const AtomicString&) const OVERRIDE; 54 virtual Node* namedItem(const AtomicString&) const OVERRIDE;
58 55
59 private: 56 private:
60 Vector<RefPtr<Node> > m_nodes; 57 Vector<RefPtr<Node> > m_nodes;
61 }; 58 };
62 59
63 } // namespace WebCore 60 } // namespace WebCore
64 61
65 #endif // StaticNodeList_h 62 #endif // StaticNodeList_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/StaticNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698