Closed Bug 43293 Opened 24 years ago Closed 24 years ago

Mozilla crashes in removeAttributeNS(...) method

Categories

(Core Graveyard :: Java APIs for DOM, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: rmv, Assigned: sdv)

Details

(Keywords: crash)

Overview Description: 
Mozilla crashes in removeAttributeNS(String namespacURI, String localName)
method of ElementImpl class if any parameter is null.

Steps to Reproduce: 
Run JavaDOM API ElementImpl_removeAttributeNS_String_String_0 testcase. 

Actual Results: 
Mozilla crashes.

Expected Results: 
Mozilla should'n crash in any case.

Build Date & Platform Bug Found: 
06/20/2000 Windows NT 4.0

Additional Information:
Actually Mozilla crashes because return operator is missed after
line 528 in java/dom/jni/org_mozilla_dom_ElementImpl.cpp file:

521 JNIEXPORT void JNICALL Java_org_mozilla_dom_ElementImpl_removeAttributeNS
522   (JNIEnv *env, jobject jthis, jstring jnamespaceURI, jstring jlocalName)
523 {
524   nsIDOMElement* element = (nsIDOMElement*) 
525     env->GetLongField(jthis, JavaDOMGlobals::nodePtrFID);
526   if (!element || !jnamespaceURI || !jlocalName) {
527     JavaDOMGlobals::ThrowException(env,
528       "Element.removeAttributeNS: NULL pointer");
>>>>>>>>
529   }
530 
531   nsString* namespaceURI = JavaDOMGlobals::GetUnicode(env, jnamespaceURI);
532   if (!namespaceURI)
533       return;
reassigning to the real owner
Assignee: akhil.arora → sdv
Adding crash keyword
Keywords: crash
Severity: normal → critical
missed return statement.
fixed.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Verified with mozilla branch  Netscape_6_1_RELEASE and blackwood 
branch JAVADEV_6_1_20010831 on NT.
Mozilla do not crashed.
Status: RESOLVED → VERIFIED
QA Contact: rajendra.pallath → avm
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.