1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

JS: replace one errant reference to 'self' with 'globalThis' and remove a separate dead-code 'self' reference.

FossilOrigin-Name: da1a47932ea96755b1e11fc2547ce11780b87846af6885857318ff18f1e62c31
This commit is contained in:
stephan
2023-10-17 23:35:47 +00:00
parent 43dc31cf1f
commit 0b4de1acac
4 changed files with 11 additions and 12 deletions

View File

@ -333,7 +333,6 @@ sqlite3.initWorker1API = function(){
if(!(globalThis.WorkerGlobalScope instanceof Function)){
toss("initWorker1API() must be run from a Worker thread.");
}
const self = this.self;
const sqlite3 = this.sqlite3 || toss("Missing this.sqlite3 object.");
const DB = sqlite3.oo1.DB;
@ -657,5 +656,5 @@ sqlite3.initWorker1API = function(){
}, wState.xfer);
};
globalThis.postMessage({type:'sqlite3-api',result:'worker1-ready'});
}.bind({self, sqlite3});
}.bind({sqlite3});
});

View File

@ -37,7 +37,7 @@ import {default as sqlite3InitModule} from './sqlite3-bundler-friendly.mjs';
"use strict";
{
const urlParams = globalThis.location
? new URL(self.location.href).searchParams
? new URL(globalThis.location.href).searchParams
: new URLSearchParams();
let theJs = 'sqlite3.js';
if(urlParams.has('sqlite3.dir')){