Closed
Bug 80794
Opened 23 years ago
Closed 23 years ago
XPCDOM changes broke nsPluginInstancePeerImpl::GetJSWindow
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
mozilla0.9.1
People
(Reporter: sean, Assigned: jst)
References
()
Details
(Keywords: regression, Whiteboard: [HAVE FIX])
Attachments
(3 files)
2.06 KB,
patch
|
Details | Diff | Splinter Review | |
3.38 KB,
patch
|
Details | Diff | Splinter Review | |
2.29 KB,
patch
|
Details | Diff | Splinter Review |
The recent XPCDOM changes broke nsPluginInstancePeerImpl::GetJSWindow. This method does a QI on an nsIScriptGlobalObject to get an nsIScriptObjectOwner. The changes swapped out nsIScriptObjectOwner for nsIDOMJSWindow in GlobalWindowImpl (http://bonsai.mozilla.org/cvsview2.cgi? diff_mode=context&whitespace_mode=show&file=nsGlobalWindow.cpp&root=/cvsroot&sub dir=mozilla/dom/src/base&command=DIFF_FRAMESET&rev1=1.395&rev2=1.396).
Reporter | ||
Comment 1•23 years ago
|
||
The QI on global for nsIScriptObjectOwner at http://lxr.mozilla.org/seamonkey/source/modules/plugin/nglsrc/nsPluginInstancePe er.cpp#854 fails and window comes back with a null raw pointer. Updating keywords. This affects all sites that use the Beatnik Player plugin.
Assignee | ||
Comment 2•23 years ago
|
||
Assignee | ||
Comment 3•23 years ago
|
||
Sean, can you test the attached patch?
Status: NEW → ASSIGNED
Component: DOM Core → DOM Level 0
Whiteboard: [HAVE FIX]
Target Milestone: --- → mozilla0.9.1
Reporter | ||
Comment 4•23 years ago
|
||
tested the patch and it addresses the problem. I'll attach a revised patch tomorrow that removes the instantiation of the JVM manager since it isn't used (it was unused to begin with, likewise with the GetJSContext method). Sadly for me though, some xpconnect interfaces changed and the Beatnik plugin will crash post May 8 builds when it makes calls through vtables that are not what they used to be. :(
Assignee | ||
Comment 5•23 years ago
|
||
Sean, thanks for testing this, and for actually looking at what the code is doing :-) What interface are you calling into (and what object?) when you see the crash?
Reporter | ||
Comment 6•23 years ago
|
||
Reporter | ||
Comment 7•23 years ago
|
||
Reporter | ||
Comment 8•23 years ago
|
||
>What interface are you calling into (and what object?) when you see the crash?
I'm still looking into the changes but this is probably about it:
1. I use nsIXPConnect to call GetCurrentNativeCallContext.
nsIXPConnect got a new method GetWrappedNativeOfNativeObject that was added
before GetCurrentNativeCallContext.
2. GetCurrentNativeCallContext is used to get a nsIXPCNativeCallContext*.
The nsIXPCNativeCallContext* is used to call GetCallee, GetJSContext, GetArgc,
and GetArgvPtr.
nsIXPCNativeCallContext got two new methods (GetCalleeInterface and
GetCalleeClassInfo) that were added before GetJSContext, GetArgc, and
GetArgvPtr.
3. Something changed with nsIXPCNativeCallContext::GetCallee().
I used to successfully do this:
// pCc is the nsIXPCNativeCallContext* I got from GetCurrentNativeCallContext
nsISupports *pCallee = nsnull;
rv = pCc->GetCallee(&pCallee);
if (NS_SUCCEEDED(rv) && pCallee == (IBeatnikPlugin*)this)
Now the comparison doesn't work - have to QI pCallee and this to the same
interface (admittedly, should have done this to begin with).
4. And nsIScriptSecurityManager changed rather drastically (new methods and new
base interface).
Assignee | ||
Comment 9•23 years ago
|
||
sean, not sure there's a whole lot we can do to make that incompatibility go away w/o major changes, please file that problem as a separate bug against jband.
Reporter | ||
Comment 10•23 years ago
|
||
I guess I made this messy by making changes to the patch. Do we need dual r=? r=sean@beatnik.com for the initial patch. Johnny, can you put your stamp on the modifications I made?
Comment 11•23 years ago
|
||
sr=hyatt
Assignee | ||
Comment 12•23 years ago
|
||
Thanks for the patch and the review, patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•