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

Unified Diff: third_party/WebKit/Source/modules/push_messaging/PushEvent.cpp

Issue 1784583002: PushEvent.data should be NULL for empty payloads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/push_messaging/PushEvent.cpp
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushEvent.cpp b/third_party/WebKit/Source/modules/push_messaging/PushEvent.cpp
index 82ee42eab9fd04f348a4ddca58e43030f2c968fd..67a0595569d2abc738a60c1d7f9708de5cbc4a4f 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushEvent.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/PushEvent.cpp
@@ -9,6 +9,7 @@
namespace blink {
PushEvent::PushEvent()
+ : m_data(PushMessageData::create())
dgn 2016/03/09 21:22:25 Isn't that always creating empty data? shouldn't i
Peter Beverloo 2016/03/09 21:28:29 There's one call-site that can return a nullptr im
{
}
@@ -36,9 +37,6 @@ const AtomicString& PushEvent::interfaceName() const
PushMessageData* PushEvent::data()
{
- if (!m_data)
- m_data = PushMessageData::create();
-
return m_data.get();
}

Powered by Google App Engine
This is Rietveld 408576698