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

Side by Side Diff: Source/core/dom/custom/CustomElementCallbackQueue.h

Issue 1304043002: Make classes and structures in core/dom fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 28 matching lines...) Expand all
39 #include "wtf/PassRefPtr.h" 39 #include "wtf/PassRefPtr.h"
40 #include "wtf/RefPtr.h" 40 #include "wtf/RefPtr.h"
41 #include "wtf/Vector.h" 41 #include "wtf/Vector.h"
42 42
43 namespace blink { 43 namespace blink {
44 44
45 // FIXME: Rename this because it contains resolution and upgrade as 45 // FIXME: Rename this because it contains resolution and upgrade as
46 // well as callbacks. 46 // well as callbacks.
47 class CustomElementCallbackQueue : public NoBaseWillBeGarbageCollectedFinalized< CustomElementCallbackQueue> { 47 class CustomElementCallbackQueue : public NoBaseWillBeGarbageCollectedFinalized< CustomElementCallbackQueue> {
48 WTF_MAKE_NONCOPYABLE(CustomElementCallbackQueue); 48 WTF_MAKE_NONCOPYABLE(CustomElementCallbackQueue);
49 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(CustomElementCallbackQueue);
49 public: 50 public:
50 static PassOwnPtrWillBeRawPtr<CustomElementCallbackQueue> create(PassRefPtrW illBeRawPtr<Element>); 51 static PassOwnPtrWillBeRawPtr<CustomElementCallbackQueue> create(PassRefPtrW illBeRawPtr<Element>);
51 52
52 typedef int ElementQueueId; 53 typedef int ElementQueueId;
53 ElementQueueId owner() const { return m_owner; } 54 ElementQueueId owner() const { return m_owner; }
54 55
55 void setOwner(ElementQueueId newOwner) 56 void setOwner(ElementQueueId newOwner)
56 { 57 {
57 // ElementCallbackQueues only migrate towards the top of the 58 // ElementCallbackQueues only migrate towards the top of the
58 // processing stack. 59 // processing stack.
(...skipping 14 matching lines...) Expand all
73 RefPtrWillBeMember<Element> m_element; 74 RefPtrWillBeMember<Element> m_element;
74 WillBeHeapVector<OwnPtrWillBeMember<CustomElementProcessingStep>> m_queue; 75 WillBeHeapVector<OwnPtrWillBeMember<CustomElementProcessingStep>> m_queue;
75 ElementQueueId m_owner; 76 ElementQueueId m_owner;
76 size_t m_index; 77 size_t m_index;
77 bool m_inCreatedCallback; 78 bool m_inCreatedCallback;
78 }; 79 };
79 80
80 } // namespace blink 81 } // namespace blink
81 82
82 #endif // CustomElementCallbackQueue_h 83 #endif // CustomElementCallbackQueue_h
OLDNEW
« no previous file with comments | « Source/core/dom/custom/CustomElement.h ('k') | Source/core/dom/custom/CustomElementDescriptorHash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698