1. Keep up with interface change in nsIDocumentLoaderObserver.

2. Fix lots of bugs.
3. Implement Entities and Notations.


git-svn-id: svn://10.0.0.236/trunk@44160 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
akhil.arora%sun.com
1999-08-23 19:27:48 +00:00
parent 79155b8a2f
commit 419d2df4df
17 changed files with 629 additions and 22 deletions

View File

@@ -122,11 +122,16 @@ JNIEXPORT jobject JNICALL Java_org_mozilla_dom_NodeImpl_getAttributes
nsIDOMNamedNodeMap* nodeMap = nsnull;
nsresult rv = node->GetAttributes(&nodeMap);
if (NS_FAILED(rv) || !nodeMap) {
if (NS_FAILED(rv)) {
PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR,
("Node.getAttributes: failed (%x)\n", rv));
return NULL;
}
if (!nodeMap) {
/* according to the spec, getAttributes may return NULL when there
are no attributes. So this is not an error */
return NULL;
}
jobject jret = env->AllocObject(JavaDOMGlobals::namedNodeMapClass);
if (!jret) {
@@ -206,11 +211,16 @@ JNIEXPORT jobject JNICALL Java_org_mozilla_dom_NodeImpl_getFirstChild
nsIDOMNode* ret = nsnull;
nsresult rv = node->GetFirstChild(&ret);
if (NS_FAILED(rv) || !ret) {
if (NS_FAILED(rv)) {
PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR,
("Node.getFirstChild: failed (%x)\n", rv));
return NULL;
}
if (!ret) {
/* according to the spec, getFirstChild may return NULL when there
are no children. So this is not an error */
return NULL;
}
return JavaDOMGlobals::CreateNodeSubtype(env, ret);
}
@@ -233,11 +243,16 @@ JNIEXPORT jobject JNICALL Java_org_mozilla_dom_NodeImpl_getLastChild
nsIDOMNode* ret = nsnull;
nsresult rv = node->GetLastChild(&ret);
if (NS_FAILED(rv) || !ret) {
if (NS_FAILED(rv)) {
PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR,
("Node.getLastChild: failed (%x)\n", rv));
return NULL;
}
if (!ret) {
/* according to the spec, getLastChild may return NULL when there
are no children. So this is not an error */
return NULL;
}
return JavaDOMGlobals::CreateNodeSubtype(env, ret);
}