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

Unified Diff: third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp

Issue 2522553003: Mojo C++ bindings: switch WebKit mojom targets to use STL/WTF types. (Closed)
Patch Set: . Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp
diff --git a/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp b/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp
index 215b097587284cd755f9288ad1209a50a9f2a525..c64e7cda9e840f013fa02b52c16c300822a56ed8 100644
--- a/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp
+++ b/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp
@@ -104,10 +104,12 @@ DEFINE_TRACE(BroadcastChannel) {
EventTargetWithInlineData::trace(visitor);
}
-void BroadcastChannel::OnMessage(mojo::WTFArray<uint8_t> message) {
+void BroadcastChannel::OnMessage(const WTF::Vector<uint8_t>& message) {
// Queue a task to dispatch the event.
RefPtr<SerializedScriptValue> value = SerializedScriptValue::create(
- reinterpret_cast<const char*>(&message.front()), message.size());
+ message.isEmpty() ? nullptr
+ : reinterpret_cast<const char*>(&message.first()),
+ message.size());
MessageEvent* event = MessageEvent::create(
nullptr, value.release(),
getExecutionContext()->getSecurityOrigin()->toString());

Powered by Google App Engine
This is Rietveld 408576698