11 Jun 2001: 

> The first part of fixing bug 1785: Prompt before starting up java, is
> to write the "Starting Java..." message to the status bar.  Simon
> suggested perhaps embedders might be interested in this message and I
> agree.  I was planning on using
> nsIMsgStatusFeedback.ShowStatusMessage() to do the work, but I'm not
> sure how to obtain a ref to this interface from way down in the OJI
> code.  

No one replied to this.

I'd like to get this in to 0.9.4 and I have a simple question:

How do I post a message to the status bar so that it displays to the
user IMMEDIATELY?

Here's the stack at the time I need to post the message:

nsPluginHostImpl::SetUpPluginInstance() line 3544
nsPluginHostImpl::InstantiateEmbededPlugin() line 3144 + 24 bytes
nsObjectFrame::InstantiatePlugin() line 1207
nsObjectFrame::Reflow() line 974 + 49 bytes
nsLineLayout::ReflowFrame() line 962 + 43 bytes
nsBlockFrame::ReflowInlineFrame() line 3459 + 29 bytes
[...Lots of layout kind of stuff deleted...]
nsBlockFrame::Reflow() line 797 + 15 bytes
nsContainerFrame::ReflowChild() line 726 + 31 bytes
CanvasFrame::Reflow() line 563
nsBoxToBlockAdaptor::Reflow() line 866
nsBoxToBlockAdaptor::DoLayout() line 523 + 52 bytes
nsBox::Layout() line 986
nsScrollBoxFrame::DoLayout() line 379
nsBox::Layout() line 986
nsContainerBox::LayoutChildAt() line 591 + 16 bytes
nsGfxScrollFrameInner::LayoutBox() line 1036 + 17 bytes
nsGfxScrollFrameInner::Layout() line 1143
nsGfxScrollFrame::DoLayout() line 1044 + 15 bytes
nsBox::Layout() line 986
nsBoxFrame::Reflow() line 903
nsGfxScrollFrame::Reflow() line 733 + 25 bytes
nsContainerFrame::ReflowChild() line 726 + 31 bytes
ViewportFrame::Reflow() line 538
nsHTMLReflowCommand::Dispatch() line 145
PresShell::ProcessReflowCommand() line 5850
PresShell::ProcessReflowCommands() line 5905
PresShell::FlushPendingNotifications() line 4877
nsEventStateManager::FlushPendingEvents() line 3929
nsEventStateManager::GenerateDragGesture() line 1133
nsEventStateManager::PreHandleEvent() line 351
PresShell::HandleEventInternal() line 5644 + 43 bytes
PresShell::HandleEvent() line 5575 + 25 bytes
nsView::HandleEvent() line 377
nsView::HandleEvent() line 350
nsView::HandleEvent() line 350
nsViewManager::DispatchEvent() line 2058
HandleEvent() line 68
nsWindow::DispatchEvent() line 728 + 10 bytes
nsWindow::DispatchWindowEvent() line 749
nsWindow::DispatchMouseEvent() line 4262 + 21 bytes
ChildWindow::DispatchMouseEvent() line 4514
nsWindow::ProcessMessage() line 3198 + 24 bytes
nsWindow::WindowProc() line 996 + 27 bytes
USER32! 77e71268()

In nsPluginHostImpl::SetUpPluginInstance()
{
//...
        result = plugin->CreateInstance(NULL, kIPluginInstanceIID, (void **)&instance);
//...
}

This call to CreateInstance is where the big "freeze for at least 15
seconds" hit happens.  I'd like to put something like:

  aOwner->ShowStatus("Starting java...");

before the call to CreateInstance(), but when I do this, of course it
doesn't display, because we're ultimately executing on the WindowProc.
Is there any way to force the event loop to be processed?

Thanks,

Ed

-- 
Remove REMOVE_THIS from email address before replying.
These are my views, and may not be the same as Sun Microsystems Inc.

Reply via email to