Bug 996053 - make nsISessionStore's setTabValue, setWindowValue and setGlobalValue take arbitrary JS values but throw for non-strings, for consistency with SessionStore.jsm. r=ttaubert

--HG--
extra : rebase_source : 6fc3457960da44e27be89ff89bbc9398ec87375a
This commit is contained in:
Dão Gottwald 2014-06-18 20:12:19 +02:00
Родитель fec0b9fced
Коммит 179cf8d577
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -25,7 +25,7 @@ interface nsIDOMNode;
* |gBrowser.tabContainer| such as e.g. |gBrowser.selectedTab|.
*/
[scriptable, uuid(0c99811f-6c5f-4a78-9c31-2d266d714175)]
[scriptable, uuid(4580f5eb-693d-423d-b0ce-2cb20a962e4d)]
interface nsISessionStore : nsISupports
{
/**
@ -165,7 +165,7 @@ interface nsISessionStore : nsISupports
* @param aKey is the value's name.
* @param aStringValue is the value itself (use JSON.stringify/parse before setting JS objects).
*/
void setWindowValue(in nsIDOMWindow aWindow, in AString aKey, in AString aStringValue);
void setWindowValue(in nsIDOMWindow aWindow, in AString aKey, in jsval aStringValue);
/**
* @param aWindow is the browser window to get the value for.
@ -186,7 +186,7 @@ interface nsISessionStore : nsISupports
* @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 nsIDOMNode aTab, in AString aKey, in jsval aStringValue);
/**
* @param aTab is the tabbrowser tab to get the value for.
@ -205,7 +205,7 @@ interface nsISessionStore : nsISupports
* @param aKey is the value's name.
* @param aStringValue is the value itself (use JSON.stringify/parse before setting JS objects).
*/
void setGlobalValue(in AString aKey, in AString aStringValue);
void setGlobalValue(in AString aKey, in jsval aStringValue);
/**
* @param aTab is the browser tab to get the value for.

Просмотреть файл

@ -6,7 +6,7 @@ function test() {
/** Test for Bug 524745 **/
let uniqKey = "bug524745";
let uniqVal = Date.now();
let uniqVal = Date.now().toString();
waitForExplicitFinish();