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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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/ExceptionCode.h ('k') | Source/core/dom/MutationObserver.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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 if (!isEntangled()) 60 if (!isEntangled())
61 return; 61 return;
62 ASSERT(m_scriptExecutionContext); 62 ASSERT(m_scriptExecutionContext);
63 63
64 OwnPtr<MessagePortChannelArray> channels; 64 OwnPtr<MessagePortChannelArray> channels;
65 // Make sure we aren't connected to any of the passed-in ports. 65 // Make sure we aren't connected to any of the passed-in ports.
66 if (ports) { 66 if (ports) {
67 for (unsigned int i = 0; i < ports->size(); ++i) { 67 for (unsigned int i = 0; i < ports->size(); ++i) {
68 MessagePort* dataPort = (*ports)[i].get(); 68 MessagePort* dataPort = (*ports)[i].get();
69 if (dataPort == this || m_entangledChannel->isConnectedTo(dataPort)) { 69 if (dataPort == this || m_entangledChannel->isConnectedTo(dataPort)) {
70 ec = INVALID_STATE_ERR; 70 ec = InvalidStateError;
71 return; 71 return;
72 } 72 }
73 } 73 }
74 channels = MessagePort::disentanglePorts(ports, ec); 74 channels = MessagePort::disentanglePorts(ports, ec);
75 if (ec) 75 if (ec)
76 return; 76 return;
77 } 77 }
78 m_entangledChannel->postMessageToRemote(message, channels.release()); 78 m_entangledChannel->postMessageToRemote(message, channels.release());
79 } 79 }
80 80
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 { 233 {
234 return &m_eventTargetData; 234 return &m_eventTargetData;
235 } 235 }
236 236
237 EventTargetData* MessagePort::ensureEventTargetData() 237 EventTargetData* MessagePort::ensureEventTargetData()
238 { 238 {
239 return &m_eventTargetData; 239 return &m_eventTargetData;
240 } 240 }
241 241
242 } // namespace WebCore 242 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/ExceptionCode.h ('k') | Source/core/dom/MutationObserver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698