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

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: address falken's comments 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 86630225684ba9cf687c67cc66c788176216447a..543c45a1c3b15d84375c9de25761be9031d6fc61 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerMessageEvent.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerMessageEvent.cpp
@@ -47,6 +47,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