If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

New Embedding API crashes on Destroy

RESOLVED FIXED

Status

()

Core
Document Navigation
P3
major
RESOLVED FIXED
17 years ago
17 years ago

People

(Reporter: Rich Blinne, Assigned: blizzard)

Tracking

({embed})

Trunk
x86
Linux
embed
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

17 years ago
Since the web browser object no longer exports a docshell and
GtkMozEmbedPrivate::Destroy expects it to the docshell it uses is invalid.
Enclosed is a diff which fixes the problem in gtkmozembed.cpp:

553,554c553
<   //  nsCOMPtr <nsIDocShell> docShell = do_GetInterface(mWebBrowser);
< 
---
>   nsCOMPtr <nsIDocShell> docShell = do_GetInterface(mWebBrowser);
555a555,562
>   webProgress = do_GetInterface(docShell);
>   webProgress->RemoveProgressListener(mChromeProgress);
> 
>   // remove our key press listener
>   RemoveEventListener();
> 
>   // get the content item
>   // get the browser as an item
566,574d572
<   nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(contentItem);
<   webProgress = do_GetInterface(docShell);
<   webProgress->RemoveProgressListener(mChromeProgress);
< 
<   // remove our key press listener
<   RemoveEventListener();
< 
<   // get the content item
<   // get the browser as an item

Comment 1

17 years ago
Reassigning to Chris.
Assignee: adamlock → blizzard
(Reporter)

Comment 2

17 years ago
I am not sure that my "fix" completely solves the problem.  There may be some
timing issues with respect to the destruction of windows.  What created this bug
was hitting the window manager destruction button on a second window in galeon
(in my case my test version linked with the CVS version of mozilla).  I should
have some more detailed information later in the week.
(Assignee)

Comment 3

17 years ago
Ok, this code works just fine from where I'm standing.
(Reporter)

Comment 4

17 years ago
I am a little confused here.  Were you referring to the code as originally
written or my patch?  nsCOMPtr <nsIDocShell> docShell =
do_GetInterface(mWebBrowser); returns failure as a docshell is no longer part of
the interface.  The other issues appear to be galeon related.  I think we are
both trying to kill the widgets and that galeon is trying to update a status bar
(not controlled by the embedding) after the window is deleted.

Comment 5

17 years ago
confirming bug, since blizzard seems to have this well in hand
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

17 years ago
Keywords: embed
(Assignee)

Comment 6

17 years ago
This was checked in a long time ago.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.