@@ -27,7 +27,9 @@ namespace ssc::runtime::serviceworker {
27
27
return false ;
28
28
}
29
29
30
- this ->callback = callback;
30
+ if (callback != nullptr ) {
31
+ this ->callback = std::move (callback);
32
+ }
31
33
32
34
for (const auto & entry : this ->container .registrations ) {
33
35
const auto & registration = entry.second ;
@@ -69,10 +71,10 @@ namespace ssc::runtime::serviceworker {
69
71
)
70
72
) {
71
73
auto runtime = this ->container .bridge ->getRuntime ();
72
- runtime->dispatch ([this , runtime, callback, ®istration]() {
73
- const auto interval = runtime->services .timers .setInterval (8 , [this , runtime, callback, ®istration] (auto cancel) {
74
+ runtime->dispatch ([this , runtime, ®istration]() {
75
+ const auto interval = runtime->services .timers .setInterval (8 , [this , runtime, ®istration] (auto cancel) {
74
76
if (registration.state == Registration::State::Activated) {
75
- if (!this ->init (callback)) {
77
+ if (!this ->init (this -> callback )) {
76
78
debug (
77
79
#if SOCKET_RUNTIME_PLATFORM_APPLE
78
80
" ServiceWorkerContainer: Failed to dispatch fetch request '%s %s%s' for client '%llu'" ,
@@ -114,7 +116,7 @@ namespace ssc::runtime::serviceworker {
114
116
{" host" , request.url .hostname },
115
117
{" scheme" , request.url .scheme },
116
118
{" pathname" , pathname},
117
- {" query" , request.url .query },
119
+ {" query" , request.url .searchParams . str () },
118
120
{" headers" , request.headers .json ()},
119
121
{" client" , client}
120
122
};
0 commit comments