Closed
Bug 213032
Opened 21 years ago
Closed 21 years ago
ProxyJNI::GetField implementation is wrong
Categories
(Core Graveyard :: Java: OJI, defect)
Core Graveyard
Java: OJI
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: xiaobin.lu, Assigned: yuanyi21)
References
Details
Attachments
(1 file)
5.94 KB,
image/jpeg
|
Details |
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Build Identifier:
static jvalue GetField(JNIEnv* env, jobject obj, JNIField* field)
{
jvalue outValue;
ProxyJNIEnv& proxyEnv = GetProxyEnv(env);
nsISecureEnv* secureEnv = GetSecureEnv(env);
nsISecurityContext* securityContext = proxyEnv.getContext();
nsresult rv = secureEnv->GetField(field->mFieldType, obj, field-
>mFieldID, &outValue, securityContext);
NS_IF_RELEASE(securityContext);
return NS_SUCCEEDED(rv) ? outValue : kErrorValue;
}
#define IMPLEMENT_GET_FIELD(methodName, returnType,
jvalueField) \
static returnType JNICALL methodName(JNIEnv *env, jobject obj, jfieldID
fieldID) \
{
\
return GetField(env, obj, (JNIField*)
fieldID).jvalueField; \
}
\
The GetField is called from Liveconnect module and the last parameter pointer
passed from liveconect is jfieldID, but OJI casted it into JNIField which is
totally wrong
Reproducible: Always
Steps to Reproduce:
1. Access http://javaweb.sfbay/~xl116366/LCTest/JavaArray/TavaArrayTest.html
2. Click the button
3. The pop up box displays nothing
Expected Results:
It should print out the value
Comment 1•21 years ago
|
||
1. Access http://javaweb.sfbay/~xl116366/LCTest/JavaArray/TavaArrayTest.html
should be:
1. Access http://javaweb.sfbay/~xl116366/LCTest/JavaArray/JavaArrayTest.html
Status: NEW → ASSIGNED
Comment 2•21 years ago
|
||
I test on Mozilla 1.4b
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030417
+
jre1.4.2
a dialog popup
Comment 3•21 years ago
|
||
Comment 4•21 years ago
|
||
*** Bug 213029 has been marked as a duplicate of this bug. ***
Comment 5•21 years ago
|
||
Xiaobin:
is this bug invalid?
Thanks!
mark WFM.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•