DOM string changes. All nsString& in DOM interfaces (and interfaces needed by DOM implementations) have been changed to nsAReadableString& and nsAWritableString&. String implementation additions (sanctioned by scc) to support DOM needs. Bug 49091. r=vidur,jst,scc
git-svn-id: svn://10.0.0.236/trunk@76967 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -129,7 +129,7 @@ NS_IMETHODIMP PluginArrayImpl::Item(PRUint32 aIndex, nsIDOMPlugin** aReturn)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP PluginArrayImpl::NamedItem(const nsString& aName, nsIDOMPlugin** aReturn)
|
||||
NS_IMETHODIMP PluginArrayImpl::NamedItem(const nsAReadableString& aName, nsIDOMPlugin** aReturn)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aReturn, "null arg");
|
||||
|
||||
@@ -142,10 +142,10 @@ NS_IMETHODIMP PluginArrayImpl::NamedItem(const nsString& aName, nsIDOMPlugin** a
|
||||
*aReturn = nsnull;
|
||||
|
||||
for (PRUint32 i = 0; i < mPluginCount; i++) {
|
||||
nsString pluginName;
|
||||
nsAutoString pluginName;
|
||||
nsIDOMPlugin* plugin = mPluginArray[i];
|
||||
if (plugin->GetName(pluginName) == NS_OK) {
|
||||
if (pluginName == aName) {
|
||||
if (pluginName.Equals(aName)) {
|
||||
*aReturn = plugin;
|
||||
NS_IF_ADDREF(plugin);
|
||||
break;
|
||||
@@ -253,17 +253,17 @@ NS_IMETHODIMP PluginElementImpl::GetScriptObject(nsIScriptContext *aContext, voi
|
||||
return res;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP PluginElementImpl::GetDescription(nsString& aDescription)
|
||||
NS_IMETHODIMP PluginElementImpl::GetDescription(nsAWritableString& aDescription)
|
||||
{
|
||||
return mPlugin->GetDescription(aDescription);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP PluginElementImpl::GetFilename(nsString& aFilename)
|
||||
NS_IMETHODIMP PluginElementImpl::GetFilename(nsAWritableString& aFilename)
|
||||
{
|
||||
return mPlugin->GetFilename(aFilename);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP PluginElementImpl::GetName(nsString& aName)
|
||||
NS_IMETHODIMP PluginElementImpl::GetName(nsAWritableString& aName)
|
||||
{
|
||||
return mPlugin->GetName(aName);
|
||||
}
|
||||
@@ -289,7 +289,7 @@ NS_IMETHODIMP PluginElementImpl::Item(PRUint32 aIndex, nsIDOMMimeType** aReturn)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP PluginElementImpl::NamedItem(const nsString& aName, nsIDOMMimeType** aReturn)
|
||||
NS_IMETHODIMP PluginElementImpl::NamedItem(const nsAReadableString& aName, nsIDOMMimeType** aReturn)
|
||||
{
|
||||
if (mMimeTypeArray == nsnull) {
|
||||
nsresult rv = GetMimeTypes();
|
||||
@@ -299,10 +299,10 @@ NS_IMETHODIMP PluginElementImpl::NamedItem(const nsString& aName, nsIDOMMimeType
|
||||
|
||||
*aReturn = nsnull;
|
||||
for (PRUint32 i = 0; i < mMimeTypeCount; i++) {
|
||||
nsString type;
|
||||
nsAutoString type;
|
||||
nsIDOMMimeType* mimeType = mMimeTypeArray[i];
|
||||
if (mimeType->GetType(type) == NS_OK) {
|
||||
if (type == aName) {
|
||||
if (type.Equals(aName)) {
|
||||
*aReturn = mimeType;
|
||||
NS_ADDREF(mimeType);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user