@@ -98,6 +98,7 @@ class GetSubscriptionResultRunnable final : public WorkerRunnable {
98
98
RefPtr<PromiseWorkerProxy>&& aProxy,
99
99
nsresult aStatus, const nsAString& aEndpoint,
100
100
const nsAString& aScope,
101
+ Nullable<EpochTimeStamp>&& aExpirationTime,
101
102
nsTArray<uint8_t >&& aRawP256dhKey,
102
103
nsTArray<uint8_t >&& aAuthSecret,
103
104
nsTArray<uint8_t >&& aAppServerKey)
@@ -106,6 +107,7 @@ class GetSubscriptionResultRunnable final : public WorkerRunnable {
106
107
mStatus(aStatus),
107
108
mEndpoint(aEndpoint),
108
109
mScope(aScope),
110
+ mExpirationTime(std::move(aExpirationTime)),
109
111
mRawP256dhKey(std::move(aRawP256dhKey)),
110
112
mAuthSecret(std::move(aAuthSecret)),
111
113
mAppServerKey(std::move(aAppServerKey)) {}
@@ -117,8 +119,9 @@ class GetSubscriptionResultRunnable final : public WorkerRunnable {
117
119
promise->MaybeResolve (JS::NullHandleValue);
118
120
} else {
119
121
RefPtr<PushSubscription> sub = new PushSubscription (
120
- nullptr , mEndpoint , mScope , std::move (mRawP256dhKey ),
121
- std::move (mAuthSecret ), std::move (mAppServerKey ));
122
+ nullptr , mEndpoint , mScope , std::move (mExpirationTime ),
123
+ std::move (mRawP256dhKey ), std::move (mAuthSecret ),
124
+ std::move (mAppServerKey ));
122
125
promise->MaybeResolve (sub);
123
126
}
124
127
} else if (NS_ERROR_GET_MODULE(mStatus ) == NS_ERROR_MODULE_DOM_PUSH) {
@@ -139,6 +142,7 @@ class GetSubscriptionResultRunnable final : public WorkerRunnable {
139
142
nsresult mStatus ;
140
143
nsString mEndpoint ;
141
144
nsString mScope ;
145
+ Nullable<EpochTimeStamp> mExpirationTime ;
142
146
nsTArray<uint8_t > mRawP256dhKey ;
143
147
nsTArray<uint8_t > mAuthSecret ;
144
148
nsTArray<uint8_t > mAppServerKey ;
@@ -173,8 +177,8 @@ class GetSubscriptionCallback final : public nsIPushSubscriptionCallback {
173
177
WorkerPrivate* worker = mProxy ->GetWorkerPrivate ();
174
178
RefPtr<GetSubscriptionResultRunnable> r = new GetSubscriptionResultRunnable (
175
179
worker, std::move (mProxy ), aStatus, endpoint, mScope ,
176
- std::move (rawP256dhKey ), std::move (authSecret ),
177
- std::move (appServerKey));
180
+ std::move (mExpirationTime ), std::move (rawP256dhKey ),
181
+ std::move (authSecret), std::move ( appServerKey));
178
182
if (!r->Dispatch ()) {
179
183
return NS_ERROR_UNEXPECTED;
180
184
}
@@ -193,6 +197,7 @@ class GetSubscriptionCallback final : public nsIPushSubscriptionCallback {
193
197
private:
194
198
RefPtr<PromiseWorkerProxy> mProxy ;
195
199
nsString mScope ;
200
+ Nullable<EpochTimeStamp> mExpirationTime ;
196
201
};
197
202
198
203
NS_IMPL_ISUPPORTS (GetSubscriptionCallback, nsIPushSubscriptionCallback)
0 commit comments