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

Unified Diff: Source/modules/push_messaging/PushRegistration.cpp

Issue 396963002: ServiceWorker: Bypass resolving a promise when ExecutionContext is gone (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 5 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
« no previous file with comments | « Source/modules/push_messaging/PushRegistration.h ('k') | Source/modules/serviceworkers/ServiceWorker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/push_messaging/PushRegistration.cpp
diff --git a/Source/modules/push_messaging/PushRegistration.cpp b/Source/modules/push_messaging/PushRegistration.cpp
index 711606640848b24c0645526faeded30cf270e336..c5cb4fbc7719cacdffadee4e77789ac1fff46c5f 100644
--- a/Source/modules/push_messaging/PushRegistration.cpp
+++ b/Source/modules/push_messaging/PushRegistration.cpp
@@ -5,8 +5,21 @@
#include "config.h"
#include "modules/push_messaging/PushRegistration.h"
+#include "wtf/OwnPtr.h"
+
namespace blink {
+PushRegistration* PushRegistration::from(ScriptPromiseResolver*, WebType* registrationRaw)
+{
+ OwnPtr<WebType> registration = adoptPtr(registrationRaw);
+ return new PushRegistration(registration->endpoint, registration->registrationId);
+}
+
+void PushRegistration::dispose(WebType* registrationRaw)
+{
+ delete registrationRaw;
+}
+
PushRegistration::PushRegistration(const String& pushEndpoint, const String& pushRegistrationId)
: m_pushEndpoint(pushEndpoint)
, m_pushRegistrationId(pushRegistrationId)
« no previous file with comments | « Source/modules/push_messaging/PushRegistration.h ('k') | Source/modules/serviceworkers/ServiceWorker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698