mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 738526 - SessionStore TabValue APIs are busted r=bnicholson
This commit is contained in:
parent
94a512390d
commit
c68b07a396
@ -88,20 +88,20 @@ interface nsISessionStore : nsISupports
|
||||
*
|
||||
* @returns A string value or an empty string if none is set.
|
||||
*/
|
||||
AString getTabValue(in nsIDOMNode aTab, in AString aKey);
|
||||
AString getTabValue(in jsval aTab, in AString aKey);
|
||||
|
||||
/**
|
||||
* @param aTab is the browser tab to set the value for.
|
||||
* @param aKey is the value's name.
|
||||
* @param aStringValue is the value itself (use JSON.stringify/parse before setting JS objects).
|
||||
*/
|
||||
void setTabValue(in nsIDOMNode aTab, in AString aKey, in AString aStringValue);
|
||||
void setTabValue(in jsval aTab, in AString aKey, in AString aStringValue);
|
||||
|
||||
/**
|
||||
* @param aTab is the browser tab to get the value for.
|
||||
* @param aKey is the value's name.
|
||||
*/
|
||||
void deleteTabValue(in nsIDOMNode aTab, in AString aKey);
|
||||
void deleteTabValue(in jsval aTab, in AString aKey);
|
||||
|
||||
/**
|
||||
* @returns A boolean indicating we should restore previous browser session
|
||||
|
@ -872,13 +872,13 @@ SessionStore.prototype = {
|
||||
},
|
||||
|
||||
getTabValue: function ss_getTabValue(aTab, aKey) {
|
||||
let browser = aTab.linkedBrowser;
|
||||
let browser = aTab.browser;
|
||||
let data = browser.__SS_extdata || {};
|
||||
return data[aKey] || "";
|
||||
},
|
||||
|
||||
setTabValue: function ss_setTabValue(aTab, aKey, aStringValue) {
|
||||
let browser = aTab.linkedBrowser;
|
||||
let browser = aTab.browser;
|
||||
|
||||
// Thumbnails are actually stored in the cache, so do the save and update the URI
|
||||
if (aKey == "thumbnail") {
|
||||
@ -903,7 +903,7 @@ SessionStore.prototype = {
|
||||
},
|
||||
|
||||
deleteTabValue: function ss_deleteTabValue(aTab, aKey) {
|
||||
let browser = aTab.linkedBrowser;
|
||||
let browser = aTab.browser;
|
||||
if (browser.__SS_extdata && browser.__SS_extdata[aKey])
|
||||
delete browser.__SS_extdata[aKey];
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user