Closed Bug 213032 Opened 21 years ago Closed 21 years ago

ProxyJNI::GetField implementation is wrong

Categories

(Core Graveyard :: Java: OJI, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: xiaobin.lu, Assigned: yuanyi21)

References

Details

Attachments

(1 file)

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
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
Attached image dialog screenshot
*** Bug 213029 has been marked as a duplicate of this bug. ***
Xiaobin: is this bug invalid? Thanks!
->kyle
Assignee: joshua.xia → kyle.yuan
Status: ASSIGNED → NEW
mark WFM.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: