I get an error when running the following code in an addon in Windows and execution fails. I do not get the error on OS X, and the function executes properly.
Code:
let state = '{"windows":[{"tabs":[{"entries":[{"url":"about:blank"}]}]}]}'
SessionStore.setBrowserState(state);
Error is:
15:14:08.434 TelemetryStopwatch: key "FX_SESSION_RESTORE_RESTORE_WINDOW_MS" was already initialized 1 TelemetryStopwatch.jsm:52:0
I get the same error when trying to run the same code in scratchpad. In addition I get the following:
15:14:08.435 TypeError: access to strict mode caller function is censored 1 tulib.js line 99 > eval:3:0
15:14:08.437 [Exception... "[JavaScript Error: "access to strict mode caller function is censored" {file: "chrome://tabutils/content/tulib.js line 99 > eval" line: 3}]'[JavaScript Error: "access to strict mode caller function is censored" {file: "chrome://tabutils/content/tulib.js line 99 > eval" line: 3}]' when calling method: [nsISessionStore::setBrowserState]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: Scratchpad/1 :: <TOP_LEVEL> :: line 15" data: yes] 1 scratchpad.js:1006:7
Any ideas as to why?