| OLD | NEW |
| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 // Returns true if more work may have to be performed at the | 68 // Returns true if more work may have to be performed at the |
| 69 // checkpoint by this or other workers (for example, this work | 69 // checkpoint by this or other workers (for example, this work |
| 70 // invoked author scripts) | 70 // invoked author scripts) |
| 71 bool dispatch(); | 71 bool dispatch(); |
| 72 | 72 |
| 73 protected: | 73 protected: |
| 74 friend class CustomElementCallbackScheduler; | 74 friend class CustomElementCallbackScheduler; |
| 75 | 75 |
| 76 CustomElementCallbackQueue* createAtFrontOfCurrentElementQueue(PassRefPtr<El
ement>); | |
| 77 CustomElementCallbackQueue* ensureInCurrentElementQueue(PassRefPtr<Element>)
; | 76 CustomElementCallbackQueue* ensureInCurrentElementQueue(PassRefPtr<Element>)
; |
| 78 | 77 |
| 79 private: | 78 private: |
| 80 CustomElementCallbackDispatcher() | 79 CustomElementCallbackDispatcher() |
| 81 { | 80 { |
| 82 // Add a null element as a sentinel. This makes it possible to | 81 // Add a null element as a sentinel. This makes it possible to |
| 83 // identify elements queued when there is no | 82 // identify elements queued when there is no |
| 84 // CallbackDeliveryScope active. Also, if the processing stack | 83 // CallbackDeliveryScope active. Also, if the processing stack |
| 85 // is popped when empty, this sentinel will cause a null deref | 84 // is popped when empty, this sentinel will cause a null deref |
| 86 // crash. | 85 // crash. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 115 static const size_t kNumSentinels = 1; | 114 static const size_t kNumSentinels = 1; |
| 116 Vector<CustomElementCallbackQueue*> m_flattenedProcessingStack; | 115 Vector<CustomElementCallbackQueue*> m_flattenedProcessingStack; |
| 117 | 116 |
| 118 typedef HashMap<Element*, OwnPtr<CustomElementCallbackQueue> > ElementCallba
ckQueueMap; | 117 typedef HashMap<Element*, OwnPtr<CustomElementCallbackQueue> > ElementCallba
ckQueueMap; |
| 119 ElementCallbackQueueMap m_elementCallbackQueueMap; | 118 ElementCallbackQueueMap m_elementCallbackQueueMap; |
| 120 }; | 119 }; |
| 121 | 120 |
| 122 } | 121 } |
| 123 | 122 |
| 124 #endif // CustomElementCallbackDispatcher_h | 123 #endif // CustomElementCallbackDispatcher_h |
| OLD | NEW |