From 0fa9eca4e6ba5085987545d145dd8d278d4dca3e Mon Sep 17 00:00:00 2001 From: "bruce%cybersight.com" Date: Fri, 3 Sep 1999 07:20:03 +0000 Subject: [PATCH] Replace delete[] for char* data with nsCRT::free(). --- content/events/src/nsEventListenerManager.cpp | 2 +- layout/events/src/nsEventListenerManager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/events/src/nsEventListenerManager.cpp b/content/events/src/nsEventListenerManager.cpp index 03913bc4bd9..4e140a91d7b 100644 --- a/content/events/src/nsEventListenerManager.cpp +++ b/content/events/src/nsEventListenerManager.cpp @@ -476,7 +476,7 @@ nsresult nsEventListenerManager::AddScriptEventListener(nsIScriptContext* aConte if (nsnull != mCharName) { JS_CompileUCFunctionForPrincipals(mJSContext, mScriptObject, jsprin, mCharName, 1, mEventArgv, (jschar*)aFunc.GetUnicode(), aFunc.Length(), nsnull, 0); - delete[] mCharName; + nsCRT::free(mCharName); JSPRINCIPALS_DROP(mJSContext, jsprin); return SetJSEventListener(aContext, mScriptObject, aIID); } diff --git a/layout/events/src/nsEventListenerManager.cpp b/layout/events/src/nsEventListenerManager.cpp index 03913bc4bd9..4e140a91d7b 100644 --- a/layout/events/src/nsEventListenerManager.cpp +++ b/layout/events/src/nsEventListenerManager.cpp @@ -476,7 +476,7 @@ nsresult nsEventListenerManager::AddScriptEventListener(nsIScriptContext* aConte if (nsnull != mCharName) { JS_CompileUCFunctionForPrincipals(mJSContext, mScriptObject, jsprin, mCharName, 1, mEventArgv, (jschar*)aFunc.GetUnicode(), aFunc.Length(), nsnull, 0); - delete[] mCharName; + nsCRT::free(mCharName); JSPRINCIPALS_DROP(mJSContext, jsprin); return SetJSEventListener(aContext, mScriptObject, aIID); }