Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Jun 23, 2021
1 parent 4bf1acd commit 169d148
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/webextension/app/scripts/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ browser.runtime.onConnect.addListener(async (port) => {
};
return Comlink.expose(exports, createBackgroundEndpoint(port));
}
// release after close connection
let scripts = await db.findScriptsWithPatten(originUrl);
const getWorker = (script: Script) => {
const runningWorker = scriptWorkerSet.get(script);
Expand Down Expand Up @@ -158,11 +159,6 @@ browser.runtime.onConnect.addListener(async (port) => {
// Release reference - force GC
scripts = [];
});
const backgroundExposedObject: BackgroundToContentObject = lintEngine;
const ep = createBackgroundEndpoint(port);
ep.addEventListener("message", (evt) => {
console.log("message", evt);
});
Comlink.expose(backgroundExposedObject, ep);
Comlink.expose(lintEngine, createBackgroundEndpoint(port));
port.postMessage("textlint-editor-boot");
});

0 comments on commit 169d148

Please sign in to comment.