Closed Bug 271859 Opened 20 years ago Closed 14 years ago

thread support in plugins

Categories

(Core Graveyard :: Plug-ins, enhancement)

x86
Linux
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: borodin, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041112

If I invoke NPN_GetURL(instance,"javascript:someFunction()",NULL) in a separate
thread, then if this function tries to do anything with displayed content (or
even if it tries to alert()), mozilla crashes with asserts (###!!! ASSERTION:
nsPluginHostImpl not thread-safe: '_mOwningThread.GetThread() ==
PR_GetCurrentThread()', file nsPluginHostImpl.cpp, line 2550 )
Yet if the function does only changes to some hidden variables, everything's ok.
The problem is, I'm trying to implement some mechanism like eventing so that
plugin changes some other content on page asynchronously; and this requires
something like functions that allow independant threads doing so.

Reproducible: Always
Steps to Reproduce:
see e.g. bug 230017
reporter: note that DOM is not threadsafe. Making it so is nontrivial.
the NPAPI does not mind if you do things in threads, Java f.e. does so. it just
doesn't like it when you try to poke dom related creatures from other threads.

the plugin host, which is the thing that you caused to assert has some fairly
annoying objects floating around, but it could be marked as threadsafe. however,
given that you want to use a javascript url to interact with dom, that wouldn't
get you very far.
Assignee: nobody → jst
Anyway, I managed to handle it - via redirecting event to main thread using
XSendEvent.
Thanks for reply.
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.4) Gecko/20100413 Firefox/3.6.4
Please update if you are able to still reproduce with the latest nightly build  ftp://ftp.mozilla.org/pub/firefox/nightly/latest-trunk/
Whiteboard: [closeme 05-05-2010]
obsolete?
Assignee: jst → nobody
Depends on: 230017
Whiteboard: [closeme 05-05-2010]
NPAPI is single-threaded by design.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.