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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 return; 206 return;
207 207
208 RefPtr<SerializedScriptValue> message; 208 RefPtr<SerializedScriptValue> message;
209 OwnPtr<MessagePortChannelArray> channels; 209 OwnPtr<MessagePortChannelArray> channels;
210 while (tryGetMessage(message, channels)) { 210 while (tryGetMessage(message, channels)) {
211 // close() in Worker onmessage handler should prevent next message from dispatching. 211 // close() in Worker onmessage handler should prevent next message from dispatching.
212 if (executionContext()->isWorkerGlobalScope() && toWorkerGlobalScope(exe cutionContext())->isClosing()) 212 if (executionContext()->isWorkerGlobalScope() && toWorkerGlobalScope(exe cutionContext())->isClosing())
213 return; 213 return;
214 214
215 MessagePortArray* ports = MessagePort::entanglePorts(*executionContext() , channels.release()); 215 MessagePortArray* ports = MessagePort::entanglePorts(*executionContext() , channels.release());
216 RefPtrWillBeRawPtr<Event> evt = MessageEvent::create(ports, message.rele ase()); 216 RawPtr<Event> evt = MessageEvent::create(ports, message.release());
217 217
218 dispatchEvent(evt.release()); 218 dispatchEvent(evt.release());
219 } 219 }
220 } 220 }
221 221
222 bool MessagePort::hasPendingActivity() const 222 bool MessagePort::hasPendingActivity() const
223 { 223 {
224 // The spec says that entangled message ports should always be treated as if they have a strong reference. 224 // The spec says that entangled message ports should always be treated as if they have a strong reference.
225 // 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). 225 // 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).
226 return m_started && isEntangled(); 226 return m_started && isEntangled();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 { 292 {
293 ASSERT(executionContext()); 293 ASSERT(executionContext());
294 if (!m_scriptStateForConversion) { 294 if (!m_scriptStateForConversion) {
295 v8::Isolate* isolate = scriptIsolate(); 295 v8::Isolate* isolate = scriptIsolate();
296 m_scriptStateForConversion = ScriptState::create(v8::Context::New(isolat e), DOMWrapperWorld::create(isolate)); 296 m_scriptStateForConversion = ScriptState::create(v8::Context::New(isolat e), DOMWrapperWorld::create(isolate));
297 } 297 }
298 return m_scriptStateForConversion->context(); 298 return m_scriptStateForConversion->context();
299 } 299 }
300 300
301 } // namespace blink 301 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698