Mozilla crashes in removeAttributeNS(...) method

VERIFIED FIXED

Status

P3
critical
VERIFIED FIXED
19 years ago
7 years ago

People

(Reporter: rmv, Assigned: sdv)

Tracking

({crash})

Trunk
x86
Windows NT
crash

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

19 years ago
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;

Comment 1

19 years ago
reassigning to the real owner
Assignee: akhil.arora → sdv

Comment 2

19 years ago
Adding crash keyword
Keywords: crash

Updated

19 years ago
Severity: normal → critical
(Assignee)

Comment 3

19 years ago
missed return statement.
fixed.
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED

Comment 4

17 years ago
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
Component: Java APIs for DOM → Java APIs for DOM
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.