OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2009, 2011 Google 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 ErrorEvent* event = m_pendingErrorEvents.take(exceptionId); | 126 ErrorEvent* event = m_pendingErrorEvents.take(exceptionId); |
127 DCHECK(event); | 127 DCHECK(event); |
128 if (WorkerThreadDebugger* debugger = | 128 if (WorkerThreadDebugger* debugger = |
129 WorkerThreadDebugger::from(thread()->isolate())) | 129 WorkerThreadDebugger::from(thread()->isolate())) |
130 debugger->exceptionThrown(m_thread, event); | 130 debugger->exceptionThrown(m_thread, event); |
131 } | 131 } |
132 | 132 |
133 void WorkerGlobalScope::registerEventListener( | 133 void WorkerGlobalScope::registerEventListener( |
134 V8AbstractEventListener* eventListener) { | 134 V8AbstractEventListener* eventListener) { |
135 // TODO(sof): remove once crbug.com/677654 has been diagnosed. | 135 // TODO(sof): remove once crbug.com/677654 has been diagnosed. |
136 CHECK(&ThreadState::fromObject(this)->heap() == &ThreadState::fromObject(event
Listener)->heap()); | 136 CHECK(&ThreadState::fromObject(this)->heap() == |
| 137 &ThreadState::fromObject(eventListener)->heap()); |
137 bool newEntry = m_eventListeners.insert(eventListener).isNewEntry; | 138 bool newEntry = m_eventListeners.insert(eventListener).isNewEntry; |
138 CHECK(newEntry); | 139 CHECK(newEntry); |
139 } | 140 } |
140 | 141 |
141 void WorkerGlobalScope::deregisterEventListener( | 142 void WorkerGlobalScope::deregisterEventListener( |
142 V8AbstractEventListener* eventListener) { | 143 V8AbstractEventListener* eventListener) { |
143 auto it = m_eventListeners.find(eventListener); | 144 auto it = m_eventListeners.find(eventListener); |
144 CHECK(it != m_eventListeners.end() || m_closing); | 145 CHECK(it != m_eventListeners.end() || m_closing); |
145 m_eventListeners.remove(it); | 146 m_eventListeners.remove(it); |
146 } | 147 } |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 visitor->trace(m_timers); | 368 visitor->trace(m_timers); |
368 visitor->trace(m_eventListeners); | 369 visitor->trace(m_eventListeners); |
369 visitor->trace(m_pendingErrorEvents); | 370 visitor->trace(m_pendingErrorEvents); |
370 ExecutionContext::trace(visitor); | 371 ExecutionContext::trace(visitor); |
371 EventTargetWithInlineData::trace(visitor); | 372 EventTargetWithInlineData::trace(visitor); |
372 SecurityContext::trace(visitor); | 373 SecurityContext::trace(visitor); |
373 Supplementable<WorkerGlobalScope>::trace(visitor); | 374 Supplementable<WorkerGlobalScope>::trace(visitor); |
374 } | 375 } |
375 | 376 |
376 } // namespace blink | 377 } // namespace blink |
OLD | NEW |