From d29c376adfa97a82517dc6bbcb09082451ff1a11 Mon Sep 17 00:00:00 2001 From: Infocatcher Date: Fri, 21 Aug 2015 14:08:21 +0300 Subject: [PATCH] Don't parse data twice in case of not yet initialized remote frame (#38) --- Session_Bookmarks/sessionBookmarks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Session_Bookmarks/sessionBookmarks.js b/Session_Bookmarks/sessionBookmarks.js index 0ca1f713..ff3477d9 100644 --- a/Session_Bookmarks/sessionBookmarks.js +++ b/Session_Bookmarks/sessionBookmarks.js @@ -1206,7 +1206,6 @@ this.bookmarks = { setTabSession: function(tab, ssData, uri, mergeHistory, disableForceLoad, _isPrivate) { var data; if(ssData && "JSON" in window) try { - data = JSON.parse(ssData); // For better compatibility with Private Tab extension let privateAttr = "privateTab-isPrivate"; let isPrivate = _isPrivate || false; @@ -1233,6 +1232,7 @@ this.bookmarks = { mm.loadFrameScript("data:application/javascript," + encodeURIComponent(data), false); return; } + data = JSON.parse(ssData); if(isPrivate) { if(!data.attributes) data.attributes = {};