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

Side by Side Diff: Source/modules/serviceworkers/StashedMessagePort.cpp

Issue 1140343003: Oilpan: fix build after r195535. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: more trace tidying Created 5 years, 7 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "modules/serviceworkers/StashedMessagePort.h" 6 #include "modules/serviceworkers/StashedMessagePort.h"
7 7
8 #include "bindings/core/v8/SerializedScriptValue.h" 8 #include "bindings/core/v8/SerializedScriptValue.h"
9 #include "core/dom/CrossThreadTask.h" 9 #include "core/dom/CrossThreadTask.h"
10 #include "core/events/MessageEvent.h" 10 #include "core/events/MessageEvent.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 { 51 {
52 ASSERT(executionContext()); 52 ASSERT(executionContext());
53 executionContext()->postTask(FROM_HERE, createCrossThreadTask(&StashedMessag ePort::dispatchMessages, m_weakFactory.createWeakPtr())); 53 executionContext()->postTask(FROM_HERE, createCrossThreadTask(&StashedMessag ePort::dispatchMessages, m_weakFactory.createWeakPtr()));
54 } 54 }
55 55
56 void StashedMessagePort::dispatchMessages() 56 void StashedMessagePort::dispatchMessages()
57 { 57 {
58 if (!isEntangled()) 58 if (!isEntangled())
59 return; 59 return;
60 ASSERT(executionContext()->isServiceWorkerGlobalScope()); 60 ASSERT(executionContext()->isServiceWorkerGlobalScope());
61 RefPtr<StashedPortCollection> stashedPorts = toServiceWorkerGlobalScope(exec utionContext())->ports(); 61 RefPtrWillBeRawPtr<StashedPortCollection> stashedPorts = toServiceWorkerGlob alScope(executionContext())->ports();
62 62
63 RefPtr<SerializedScriptValue> message; 63 RefPtr<SerializedScriptValue> message;
64 OwnPtr<MessagePortChannelArray> channels; 64 OwnPtr<MessagePortChannelArray> channels;
65 while (tryGetMessage(message, channels)) { 65 while (tryGetMessage(message, channels)) {
66 OwnPtrWillBeRawPtr<MessagePortArray> ports = MessagePort::entanglePorts( *executionContext(), channels.release()); 66 OwnPtrWillBeRawPtr<MessagePortArray> ports = MessagePort::entanglePorts( *executionContext(), channels.release());
67 RefPtrWillBeRawPtr<Event> evt = MessageEvent::create(ports.release(), me ssage.release(), String(), String(), this); 67 RefPtrWillBeRawPtr<Event> evt = MessageEvent::create(ports.release(), me ssage.release(), String(), String(), this);
68 68
69 stashedPorts->dispatchEvent(evt.release(), ASSERT_NO_EXCEPTION); 69 stashedPorts->dispatchEvent(evt.release(), ASSERT_NO_EXCEPTION);
70 } 70 }
71 } 71 }
72 72
73 } // namespace blink 73 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp ('k') | Source/modules/serviceworkers/StashedPortCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698