8F1111/i386 (latest seed)
FF1.5rc1/intel/josh-build crashes with JEP 0.9.4+a, crash log to follow.
Created attachment 201899 [details]
Crash log of JEP when visiting page with an applet
We may just need a recompile here, both the josh-firefox binary and the JEP
were pre-8F1111 for me. We may be getting bitten by either the jni.h or
the dyld problems from earlier 8F* builds.
JEP: 0.9.4+a, steven mailed this to me 10/3/2005
FF15rc1: the binary from josh's blog site:
Firefox (http://josh.trancesoftware.com/mozilla/firefox-1.5.intel.mac.dmg) (2005.10.21, contains patch from bug 312929 (https://bugzilla.mozilla.org/show_bug.cgi?id=312929))
I've got this covered.
Created attachment 208768 [details] [diff] [review]
Make MRJPluginJEP on x86 functional
Patch against JEP 0.9.5+b, MRJPlugin in-tree portion. A test build with this plugin is available at http://wiki.mozilla.org/Mac:Intel .
JEP still doesn't work with Cocoa on x86. It crashes with an evil $ebp and resultant garbage stack. Dumping from $esp gave some clues. At the very least, direct use of objc_msgSend_stret is causing problems because the calling convention varies.
If [normal objc] is out of the question (I see why it's difficult where it's not used), we can do something like:
#define objc_msgSend_stret_NSRect objc_msgSend_stret
#elif defined (__i386__)
static const NSRect (*objc_msgSend_stret_NSRect)(NSRect*, id, SEL, ...) = &objc
objc_msgSend_stret_NSRect(&dirty, self, @selector(_dirtyRect));
These changes prevent $ebp from getting trashed due to not following the ABI and allows something resembling normal flow. I still see crashes in objc_msgSend_stret called by something in AppKit, usually on something overridden by JEP where JEP calls back into AppKit with objc_msgSendSuper.
I can get the first frame of the applet to display by skipping the call into [NSView _propagateDirtyRectsToOpaqueAncestors]. And I can bypass the crashes entirely by skipping the call into [NSView _drawRect:clip:], but of course nothing draws then.
Making these calls through [normal objc] allows JEP to function in Camino.
Created attachment 208885 [details] [diff] [review]
Make JavaEmbeddingPlugin for Cocoa browsers functional on x86
objc_msgSend_stret was the only culprit. I wasn't able to successfully send messages by calling that function directly, so I adapted it to standard Objective-C and added category interfaces to handle private methods that aren't defined by the system headers.
A fat JEP has been checked into CAMINO_1_0_BRANCH. This is JEP 0.9.5+c with x86 bits produced using these patches merged in using lipo.
This was fixed on the trunk, 1_8, and 1_8_0 branches by checking in a universal JEP 0.9.5+c with these patches in bug 327785. Bug 327785 contains details about what exactly was checked in. This bug will remain open until the patches or something else that accounts for the bugs makes it upstream to the JEP.
This is SO fixed.