From 33e5911cb2741ae57ef41ec245636733568f362c Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Sun, 7 Feb 2021 02:46:07 -0800 Subject: trying to just run straight from sandbox instead of xpc -- kinda works! blocked on libfuse --- extension/background.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'extension/background.js') diff --git a/extension/background.js b/extension/background.js index e6fba2b..f38f29e 100644 --- a/extension/background.js +++ b/extension/background.js @@ -713,19 +713,24 @@ async function onMessage(req) { }; function tryConnect() { + console.log('start tryConnect'); port = chrome.runtime.connectNative('com.rsnous.tabfs'); + console.log('start tryConnect - did connectNative'); port.onMessage.addListener(onMessage); port.onDisconnect.addListener(p => {console.log('disconnect', p)}); + console.log('tryConnect - about to sNM'); // Safari is very weird -- it has this native app that we have to talk to, // so we poke that app to wake it up, get it to start the TabFS process, // and get it to start calling us whenever TabFS wants to do an FS call. // Is there a better way to do this? if (chrome.runtime.getURL('/').startsWith('safari-web-extension://')) { // Safari-only chrome.runtime.sendNativeMessage('com.rsnous.tabfs', {op: 'safari_did_connect'}, function(resp) { + console.log('didConnect resp'); console.log(resp); }); } + console.log('tryConnect - did sNM'); } if (!TESTING) { -- cgit v1.2.3