Fix build for non-iOS platforms. :|
[WebKit-https.git] / Source / WebCore / Modules / notifications / WorkerGlobalScopeNotifications.cpp
index 469f62c..4e1e675 100644 (file)
@@ -54,8 +54,9 @@ WorkerGlobalScopeNotifications* WorkerGlobalScopeNotifications::from(WorkerGloba
 {
     WorkerGlobalScopeNotifications* supplement = static_cast<WorkerGlobalScopeNotifications*>(Supplement<ScriptExecutionContext>::from(context, supplementName()));
     if (!supplement) {
-        supplement = new WorkerGlobalScopeNotifications(context);
-        Supplement<ScriptExecutionContext>::provideTo(context, supplementName(), adoptPtr(supplement));
+        auto newSupplement = std::make_unique<WorkerGlobalScopeNotifications>(context);
+        supplement = newSupplement.get();
+        provideTo(context, supplementName(), WTF::move(newSupplement));
     }
     return supplement;
 }