Freezes the nsIProperties interface. 162114. r=ccarlen, sr=alecf. Freezes the mozIJSSubScriptLoader interface. 157136. r=rginda, sr=alec.
This commit is contained in:
@@ -95,31 +95,6 @@ nsProperties::AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsProperties::Define(const char* prop, nsISupports* initialValue)
|
||||
{
|
||||
nsCStringKey key(prop);
|
||||
if (Exists(&key))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsISupports* prevValue = (nsISupports*)Put(&key, initialValue);
|
||||
NS_ASSERTION(prevValue == NULL, "hashtable error");
|
||||
NS_IF_ADDREF(initialValue);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsProperties::Undefine(const char* prop)
|
||||
{
|
||||
nsCStringKey key(prop);
|
||||
if (!Exists(&key))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsISupports* prevValue = (nsISupports*)Remove(&key);
|
||||
NS_IF_RELEASE(prevValue);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsProperties::Get(const char* prop, const nsIID & uuid, void* *result)
|
||||
{
|
||||
@@ -148,6 +123,18 @@ nsProperties::Set(const char* prop, nsISupports* value)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsProperties::Undefine(const char* prop)
|
||||
{
|
||||
nsCStringKey key(prop);
|
||||
if (!Exists(&key))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsISupports* prevValue = (nsISupports*)Remove(&key);
|
||||
NS_IF_RELEASE(prevValue);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsProperties::Has(const char* prop, PRBool *result)
|
||||
{
|
||||
@@ -156,4 +143,10 @@ nsProperties::Has(const char* prop, PRBool *result)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsProperties::GetKeys(PRUint32 *count, char ***keys)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user