Closed Bug 124053 Opened 22 years ago Closed 20 years ago
Fix invalid use of JVMContext TLS to map between threads, JSContexts and JSJava
The OJI module has been playing fast and loose with JSContexts, JSJavaThreadStates and mapping them to the current thread using thread local storage. This is totally bogus, and needs to be cleaned up.
This removes a ton of dead code, and begins to reform the use of the JVMContext thread local storage mechanism.
Assignee: joe.chou → beard
Comment on attachment 68261 [details] [diff] [review] Patch to clean up OJI module >+ JSContext *cx = nsnull; >+ nsCOMPtr<nsIJSContextStack> stack = do_GetService("@mozilla.org/js/xpc/ContextStack;1"); >+ if (stack) stack->Peek(&cx); > > nsCSecurityContext *securityContext = new nsCSecurityContext(cx); Not sure if there is really any point in creating this if cx is null, but it handles the condition internally so I guess it doesn't matter. r=bnesse.
Attachment #68261 - Flags: review+
Need an sr.
Status: NEW → ASSIGNED
Comment on attachment 68261 [details] [diff] [review] Patch to clean up OJI module email@example.com
Attachment #68261 - Flags: superreview+
checked in; marking fixed, please reopen if this is not actually fixed Checking in src/jvmmgr.cpp; /cvsroot/mozilla/modules/oji/src/jvmmgr.cpp,v <-- jvmmgr.cpp new revision: 1.42; previous revision: 1.41 done Checking in src/lcglue.cpp; /cvsroot/mozilla/modules/oji/src/lcglue.cpp,v <-- lcglue.cpp new revision: 1.53; previous revision: 1.52 done Checking in src/lcglue.h; /cvsroot/mozilla/modules/oji/src/lcglue.h,v <-- lcglue.h new revision: 1.8; previous revision: 1.7 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.