Bug 118535 - Some Java plugin instances can deadlock with the WebProcess on NPP_Destroy
Summary: Some Java plugin instances can deadlock with the WebProcess on NPP_Destroy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-07-10 11:07 PDT by Brady Eidson
Modified: 2013-07-10 11:35 PDT (History)
1 user (show)

See Also:


Attachments
Patch v1 (1.79 KB, patch)
2013-07-10 11:23 PDT, Brady Eidson
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2013-07-10 11:07:07 PDT
Some Java plugin instances can deadlock with the WebProcess on NPP_Destroy

The newest official Java plugin does some of its NPP_Destroy cleanup work on a background thread.

This includes calling NP_Deallocate on an NPObject on that background thread.

Doing that is unsupported, has undefined behavior, and as of http://trac.webkit.org/changeset/139514 will cause a deadlock.

Since we can't fix the Java plugin and since this is during plugin teardown anyways, we can marshall the destruction back to the main thread.

In radar as <rdar://problem/14286390>
Comment 1 Brady Eidson 2013-07-10 11:23:04 PDT
Created attachment 206400 [details]
Patch v1
Comment 2 Alexey Proskuryakov 2013-07-10 11:25:22 PDT
Comment on attachment 206400 [details]
Patch v1 

Perhaps add some pointers to why we have such a hack, and only in one place?
Comment 3 Brady Eidson 2013-07-10 11:35:18 PDT
http://trac.webkit.org/changeset/152539