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

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

Issue 22417002: Rename ASSERT_NO_EXCEPTION_STATE and IGNORE_EXCEPTION_STATE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Node.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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 OwnPtr<MessagePortChannelArray> channels; 163 OwnPtr<MessagePortChannelArray> channels;
164 while (m_entangledChannel && m_entangledChannel->tryGetMessageFromRemote(mes sage, channels)) { 164 while (m_entangledChannel && m_entangledChannel->tryGetMessageFromRemote(mes sage, channels)) {
165 165
166 // close() in Worker onmessage handler should prevent next message from dispatching. 166 // close() in Worker onmessage handler should prevent next message from dispatching.
167 if (m_scriptExecutionContext->isWorkerGlobalScope() && toWorkerGlobalSco pe(m_scriptExecutionContext)->isClosing()) 167 if (m_scriptExecutionContext->isWorkerGlobalScope() && toWorkerGlobalSco pe(m_scriptExecutionContext)->isClosing())
168 return; 168 return;
169 169
170 OwnPtr<MessagePortArray> ports = MessagePort::entanglePorts(*m_scriptExe cutionContext, channels.release()); 170 OwnPtr<MessagePortArray> ports = MessagePort::entanglePorts(*m_scriptExe cutionContext, channels.release());
171 RefPtr<Event> evt = MessageEvent::create(ports.release(), message.releas e()); 171 RefPtr<Event> evt = MessageEvent::create(ports.release(), message.releas e());
172 172
173 dispatchEvent(evt.release(), ASSERT_NO_EXCEPTION_STATE); 173 dispatchEvent(evt.release(), ASSERT_NO_EXCEPTION);
174 } 174 }
175 } 175 }
176 176
177 bool MessagePort::hasPendingActivity() 177 bool MessagePort::hasPendingActivity()
178 { 178 {
179 // The spec says that entangled message ports should always be treated as if they have a strong reference. 179 // The spec says that entangled message ports should always be treated as if they have a strong reference.
180 // We'll also stipulate that the queue needs to be open (if the app drops it s reference to the port before start()-ing it, then it's not really entangled as it's unreachable). 180 // We'll also stipulate that the queue needs to be open (if the app drops it s reference to the port before start()-ing it, then it's not really entangled as it's unreachable).
181 if (m_started && m_entangledChannel && m_entangledChannel->hasPendingActivit y()) 181 if (m_started && m_entangledChannel && m_entangledChannel->hasPendingActivit y())
182 return true; 182 return true;
183 if (isEntangled() && !locallyEntangledPort()) 183 if (isEntangled() && !locallyEntangledPort())
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 { 235 {
236 return &m_eventTargetData; 236 return &m_eventTargetData;
237 } 237 }
238 238
239 EventTargetData* MessagePort::ensureEventTargetData() 239 EventTargetData* MessagePort::ensureEventTargetData()
240 { 240 {
241 return &m_eventTargetData; 241 return &m_eventTargetData;
242 } 242 }
243 243
244 } // namespace WebCore 244 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698