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

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

Issue 2833673002: Revert of Messaging: Avoid calling non-thread-safe functions in MessagePort::messageAvailable() (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/MessagePort.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 16 matching lines...) Expand all
27 #ifndef MessagePort_h 27 #ifndef MessagePort_h
28 #define MessagePort_h 28 #define MessagePort_h
29 29
30 #include <memory> 30 #include <memory>
31 #include "bindings/core/v8/ActiveScriptWrappable.h" 31 #include "bindings/core/v8/ActiveScriptWrappable.h"
32 #include "bindings/core/v8/SerializedScriptValue.h" 32 #include "bindings/core/v8/SerializedScriptValue.h"
33 #include "core/CoreExport.h" 33 #include "core/CoreExport.h"
34 #include "core/dom/ContextLifecycleObserver.h" 34 #include "core/dom/ContextLifecycleObserver.h"
35 #include "core/events/EventListener.h" 35 #include "core/events/EventListener.h"
36 #include "core/events/EventTarget.h" 36 #include "core/events/EventTarget.h"
37 #include "platform/WebTaskRunner.h"
38 #include "platform/wtf/PassRefPtr.h" 37 #include "platform/wtf/PassRefPtr.h"
39 #include "platform/wtf/RefPtr.h" 38 #include "platform/wtf/RefPtr.h"
40 #include "platform/wtf/Vector.h" 39 #include "platform/wtf/Vector.h"
41 #include "public/platform/WebMessagePortChannel.h" 40 #include "public/platform/WebMessagePortChannel.h"
42 #include "public/platform/WebMessagePortChannelClient.h" 41 #include "public/platform/WebMessagePortChannelClient.h"
43 42
44 namespace blink { 43 namespace blink {
45 44
46 class ExceptionState; 45 class ExceptionState;
47 class ExecutionContext; 46 class ExecutionContext;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 bool TryGetMessage(RefPtr<SerializedScriptValue>& message, 133 bool TryGetMessage(RefPtr<SerializedScriptValue>& message,
135 MessagePortChannelArray& channels); 134 MessagePortChannelArray& channels);
136 135
137 private: 136 private:
138 // WebMessagePortChannelClient implementation. 137 // WebMessagePortChannelClient implementation.
139 void MessageAvailable() override; 138 void MessageAvailable() override;
140 void DispatchMessages(); 139 void DispatchMessages();
141 140
142 std::unique_ptr<WebMessagePortChannel> entangled_channel_; 141 std::unique_ptr<WebMessagePortChannel> entangled_channel_;
143 142
144 int pending_dispatch_task_ = 0; 143 int pending_dispatch_task_;
145 bool started_ = false; 144 bool started_;
146 bool closed_ = false; 145 bool closed_;
147
148 RefPtr<WebTaskRunner> task_runner_;
149 }; 146 };
150 147
151 } // namespace blink 148 } // namespace blink
152 149
153 #endif // MessagePort_h 150 #endif // MessagePort_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/MessagePort.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698