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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerMessageEvent.cpp

Issue 1658073002: ServiceWorker: Implement attributes of ExtendableMessageEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: templatize duplicate code 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerMessageEvent.cpp
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerMessageEvent.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerMessageEvent.cpp
index 757c50d032d62cd608982b969f0d65994f85dd62..5f7653c7098c82e549583c8d8869b0dc32e1e525 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerMessageEvent.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerMessageEvent.cpp
@@ -45,6 +45,10 @@ ServiceWorkerMessageEvent::~ServiceWorkerMessageEvent()
MessagePortArray ServiceWorkerMessageEvent::ports(bool& isNull) const
{
+ // TODO(bashi): Currently we return a copied array because the binding
+ // layer could modify the content of the array while executing JS callbacks.
+ // Avoid copying once we can make sure that the binding layer won't
+ // modify the content.
if (m_ports) {
isNull = false;
return *m_ports;

Powered by Google App Engine
This is Rietveld 408576698