File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed
Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -305,10 +305,16 @@ final class DatabaseClient implements WebSqlite {
305305
306306 Future <void > _startDedicated () async {
307307 if (globalContext.has ('Worker' )) {
308- final dedicated = Worker (
309- workerUri.toString ().toJS,
310- WorkerOptions (name: 'sqlite3_worker' ),
311- );
308+ final Worker dedicated;
309+ try {
310+ dedicated = Worker (
311+ workerUri.toString ().toJS,
312+ WorkerOptions (name: 'sqlite3_worker' ),
313+ );
314+ } on Object {
315+ _missingFeatures.add (MissingBrowserFeature .dedicatedWorkers);
316+ return ;
317+ }
312318
313319 final (endpoint, channel) = await createChannel ();
314320 ConnectRequest (endpoint: endpoint, requestId: 0 ).sendToWorker (dedicated);
@@ -322,7 +328,14 @@ final class DatabaseClient implements WebSqlite {
322328
323329 Future <void > _startShared () async {
324330 if (globalContext.has ('SharedWorker' )) {
325- final shared = SharedWorker (workerUri.toString ().toJS);
331+ final SharedWorker shared;
332+ try {
333+ shared = SharedWorker (workerUri.toString ().toJS);
334+ } on Object {
335+ _missingFeatures.add (MissingBrowserFeature .sharedWorkers);
336+ return ;
337+ }
338+
326339 shared.port.start ();
327340
328341 final (endpoint, channel) = await createChannel ();
You can’t perform that action at this time.
0 commit comments