fix for bug=43290
git-svn-id: svn://10.0.0.236/trunk@72755 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -676,7 +676,22 @@ JNIEXPORT jobject JNICALL Java_org_mozilla_dom_ElementImpl_getElementsByTagNameN
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return JavaDOMGlobals::CreateNodeSubtype(env, (nsIDOMNode*)nodes);
|
||||
jobject jnodes = env->AllocObject(JavaDOMGlobals::nodeListClass);
|
||||
if (!jnodes) {
|
||||
JavaDOMGlobals::ThrowException(env,
|
||||
"Element.getElementsByTagNameNS: failed to allocate object");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
env->SetLongField(jnodes, JavaDOMGlobals::nodeListPtrFID, (jlong) nodes);
|
||||
if (env->ExceptionOccurred()) {
|
||||
JavaDOMGlobals::ThrowException(env,
|
||||
"Element.getElementsByTagNameNS: failed to set node ptr");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
nodes->AddRef();
|
||||
return jnodes;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user