| OLD | NEW |
| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 ASSERT(m_entangledChannel); | 126 ASSERT(m_entangledChannel); |
| 127 m_entangledChannel->setClient(0); | 127 m_entangledChannel->setClient(0); |
| 128 return m_entangledChannel.release(); | 128 return m_entangledChannel.release(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 // Invoked to notify us that there are messages available for this port. | 131 // Invoked to notify us that there are messages available for this port. |
| 132 // 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). | 132 // 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). |
| 133 void MessagePort::messageAvailable() | 133 void MessagePort::messageAvailable() |
| 134 { | 134 { |
| 135 ASSERT(executionContext()); | 135 ASSERT(executionContext()); |
| 136 executionContext()->postTask(FROM_HERE, createCrossThreadTask(&MessagePort::
dispatchMessages, m_weakFactory.createWeakPtr())); | 136 executionContext()->postTask(BLINK_FROM_HERE, createCrossThreadTask(&Message
Port::dispatchMessages, m_weakFactory.createWeakPtr())); |
| 137 } | 137 } |
| 138 | 138 |
| 139 void MessagePort::start() | 139 void MessagePort::start() |
| 140 { | 140 { |
| 141 // Do nothing if we've been cloned or closed. | 141 // Do nothing if we've been cloned or closed. |
| 142 if (!isEntangled()) | 142 if (!isEntangled()) |
| 143 return; | 143 return; |
| 144 | 144 |
| 145 ASSERT(executionContext()); | 145 ASSERT(executionContext()); |
| 146 if (m_started) | 146 if (m_started) |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 { | 293 { |
| 294 ASSERT(executionContext()); | 294 ASSERT(executionContext()); |
| 295 if (!m_scriptStateForConversion) { | 295 if (!m_scriptStateForConversion) { |
| 296 v8::Isolate* isolate = scriptIsolate(); | 296 v8::Isolate* isolate = scriptIsolate(); |
| 297 m_scriptStateForConversion = ScriptState::create(v8::Context::New(isolat
e), DOMWrapperWorld::create(isolate)); | 297 m_scriptStateForConversion = ScriptState::create(v8::Context::New(isolat
e), DOMWrapperWorld::create(isolate)); |
| 298 } | 298 } |
| 299 return m_scriptStateForConversion->context(); | 299 return m_scriptStateForConversion->context(); |
| 300 } | 300 } |
| 301 | 301 |
| 302 } // namespace blink | 302 } // namespace blink |
| OLD | NEW |