From 2d8cdc7b2143712fbc229514528197bde32f0503 Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Wed, 3 May 2000 23:42:20 +0000 Subject: [PATCH] Must use string literal for named references. --- content/base/src/nsGenericDOMDataNode.cpp | 5 +---- content/base/src/nsGenericElement.cpp | 4 +--- layout/base/src/nsGenericDOMDataNode.cpp | 5 +---- layout/base/src/nsGenericElement.cpp | 4 +--- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/content/base/src/nsGenericDOMDataNode.cpp b/content/base/src/nsGenericDOMDataNode.cpp index 4b5e4d1ac27..77615b43caa 100644 --- a/content/base/src/nsGenericDOMDataNode.cpp +++ b/content/base/src/nsGenericDOMDataNode.cpp @@ -512,12 +512,9 @@ nsGenericDOMDataNode::GetScriptObject(nsIContent *aOuterContent, nsAutoString nodeName; char nameBuf[128]; - node->GetNodeName(nodeName); - nodeName.ToCString(nameBuf, sizeof(nameBuf)); - aContext->AddNamedReference((void *)&mScriptObject, mScriptObject, - nameBuf); + "nsGenericDOMDataNode::mScriptObject"); } NS_RELEASE(node); NS_RELEASE(factory); diff --git a/content/base/src/nsGenericElement.cpp b/content/base/src/nsGenericElement.cpp index aa1295ba729..aa65a03eeb8 100644 --- a/content/base/src/nsGenericElement.cpp +++ b/content/base/src/nsGenericElement.cpp @@ -1225,12 +1225,10 @@ nsGenericElement::GetScriptObject(nsIScriptContext* aContext, (void**)&slots->mScriptObject); NS_RELEASE(factory); - char tagBuf[50]; - tag.ToCString(tagBuf, sizeof(tagBuf)); if (nsnull != mDocument) { aContext->AddNamedReference((void *)&slots->mScriptObject, slots->mScriptObject, - tagBuf); + "nsGenericElement::mScriptObject"); } } *aScriptObject = slots->mScriptObject; diff --git a/layout/base/src/nsGenericDOMDataNode.cpp b/layout/base/src/nsGenericDOMDataNode.cpp index 4b5e4d1ac27..77615b43caa 100644 --- a/layout/base/src/nsGenericDOMDataNode.cpp +++ b/layout/base/src/nsGenericDOMDataNode.cpp @@ -512,12 +512,9 @@ nsGenericDOMDataNode::GetScriptObject(nsIContent *aOuterContent, nsAutoString nodeName; char nameBuf[128]; - node->GetNodeName(nodeName); - nodeName.ToCString(nameBuf, sizeof(nameBuf)); - aContext->AddNamedReference((void *)&mScriptObject, mScriptObject, - nameBuf); + "nsGenericDOMDataNode::mScriptObject"); } NS_RELEASE(node); NS_RELEASE(factory); diff --git a/layout/base/src/nsGenericElement.cpp b/layout/base/src/nsGenericElement.cpp index aa1295ba729..aa65a03eeb8 100644 --- a/layout/base/src/nsGenericElement.cpp +++ b/layout/base/src/nsGenericElement.cpp @@ -1225,12 +1225,10 @@ nsGenericElement::GetScriptObject(nsIScriptContext* aContext, (void**)&slots->mScriptObject); NS_RELEASE(factory); - char tagBuf[50]; - tag.ToCString(tagBuf, sizeof(tagBuf)); if (nsnull != mDocument) { aContext->AddNamedReference((void *)&slots->mScriptObject, slots->mScriptObject, - tagBuf); + "nsGenericElement::mScriptObject"); } } *aScriptObject = slots->mScriptObject;