Closed
Bug 412186
Opened 17 years ago
Closed 17 years ago
Last widget close should not cause XPCOM shutdown.
Categories
(Core Graveyard :: Embedding: GTK Widget, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: romaxa, Assigned: romaxa)
Details
Attachments
(1 file)
4.98 KB,
patch
|
benjamin
:
review-
timeless
:
review-
|
Details | Diff | Splinter Review |
Closing of the last gtk widget will shutdown XPCOM:
http://mxr.mozilla.org/seamonkey/source/embedding/browser/gtk/src/EmbedPrivate.cpp#202
I guess it should be possible to close last widget without terminate XRE Embedding, and allow terminate XRE by gtk_moz_embed_pop_startup call.
Assignee | ||
Comment 1•17 years ago
|
||
Attachment #297340 -
Flags: review?(mpgritti)
Comment 2•17 years ago
|
||
romaxa, please remember to check the "take bug" checkbox when attaching a patch for a bug so that the bug gets reassigned to you. Thanks!
Assignee: nobody → romaxa
Comment on attachment 297340 [details] [diff] [review]
Proposed fix
tabs:
+ if (sWidgetCount > 0 || sXpcomStarted)
+ return;
this pretty much neuters
EmbedPrivate::PushStartup
EmbedPrivate::PopStartup
I don't think that's such a good thing.
It sounds like the embedder here should call gtk_moz_embed_push_startup/gtk_moz_embed_pop_startup before initializing anything else. The one extra push/pop pair before poking EmbedPrivate should trigger the more proper behavior without breaking anyone else.
Attachment #297340 -
Flags: superreview?(roc)
Attachment #297340 -
Flags: review?(benjamin)
Comment on attachment 297340 [details] [diff] [review]
Proposed fix
with that, i'm going to mark my own personal r- and suggest this bug is invalid. however any new module owners are free to clear my review and do whatever they please.
Attachment #297340 -
Flags: review-
Assignee | ||
Comment 5•17 years ago
|
||
I just want to works next chain of calls:
push_startup
gtk_moz_embed_new()
destroy(GtkMozEmbedWidget)
gtk_moz_embed_new()
destroy(GtkMozEmbedWidget)
pop_startup();
exit();
Attachment #297340 -
Flags: superreview?(roc)
Comment 6•17 years ago
|
||
Comment on attachment 297340 [details] [diff] [review]
Proposed fix
I agree this is incorrect. If you don't want to shut down when the last widget closes you should explicitly push_startup before doing anything else.
Attachment #297340 -
Flags: review?(mpgritti)
Attachment #297340 -
Flags: review?(benjamin)
Attachment #297340 -
Flags: review-
Updated•17 years ago
|
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Comment 7•17 years ago
|
||
Or perhaps I don't understand... romaxa are you saying that your sequence doesn't work? If so, can you explain why not? It looks like it should work.
Assignee | ||
Comment 8•17 years ago
|
||
> If so, can you explain why not? It looks like it should work.
I'm not sure where is the real problem, but after second XPCOM restart and attempt to create new GtkMozEmbed widget it crashes...
I will try to locate problem (probably some static variables in XPCOM or in EmbedPrivate) and create new bug against proper component.
Comment 9•17 years ago
|
||
No, no, I mean, we should be starting XPCOM once and shutting it down once:
push_startup -- start XPCOM here
gtk_moz_embed_new()
destroy(GtkMozEmbedWidget)
gtk_moz_embed_new()
destroy(GtkMozEmbedWidget)
pop_startup(); -- shutdown XPCOM here
Updated•13 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•