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

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

Issue 915703002: Add task location information to ExecutionContext (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 5 years, 10 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/ExecutionContext.h ('k') | Source/core/dom/StringCallback.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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 ASSERT(m_entangledChannel); 120 ASSERT(m_entangledChannel);
121 m_entangledChannel->setClient(0); 121 m_entangledChannel->setClient(0);
122 return m_entangledChannel.release(); 122 return m_entangledChannel.release();
123 } 123 }
124 124
125 // Invoked to notify us that there are messages available for this port. 125 // Invoked to notify us that there are messages available for this port.
126 // This code may be called from another thread, and so should not call any non-t hreadsafe APIs (i.e. should not call into the entangled channel or access mutabl e variables). 126 // This code may be called from another thread, and so should not call any non-t hreadsafe APIs (i.e. should not call into the entangled channel or access mutabl e variables).
127 void MessagePort::messageAvailable() 127 void MessagePort::messageAvailable()
128 { 128 {
129 ASSERT(executionContext()); 129 ASSERT(executionContext());
130 executionContext()->postTask(createCrossThreadTask(&MessagePort::dispatchMes sages, m_weakFactory.createWeakPtr())); 130 executionContext()->postTask(FROM_HERE, createCrossThreadTask(&MessagePort:: dispatchMessages, m_weakFactory.createWeakPtr()));
131 } 131 }
132 132
133 void MessagePort::start() 133 void MessagePort::start()
134 { 134 {
135 // Do nothing if we've been cloned or closed. 135 // Do nothing if we've been cloned or closed.
136 if (!isEntangled()) 136 if (!isEntangled())
137 return; 137 return;
138 138
139 ASSERT(executionContext()); 139 ASSERT(executionContext());
140 if (m_started) 140 if (m_started)
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 return portArray.release(); 260 return portArray.release();
261 } 261 }
262 262
263 void MessagePort::trace(Visitor* visitor) 263 void MessagePort::trace(Visitor* visitor)
264 { 264 {
265 ActiveDOMObject::trace(visitor); 265 ActiveDOMObject::trace(visitor);
266 EventTargetWithInlineData::trace(visitor); 266 EventTargetWithInlineData::trace(visitor);
267 } 267 }
268 268
269 } // namespace blink 269 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/ExecutionContext.h ('k') | Source/core/dom/StringCallback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698