Bug 140140 - Reimplement NPN_PluginThreadAsyncCall without using PluginMainThreadScheduler
Summary: Reimplement NPN_PluginThreadAsyncCall without using PluginMainThreadScheduler
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-06 12:21 PST by Anders Carlsson
Modified: 2015-01-06 14:26 PST (History)
0 users

See Also:


Attachments
Patch (4.11 KB, patch)
2015-01-06 12:22 PST, Anders Carlsson
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2015-01-06 12:21:09 PST
Reimplement NPN_PluginThreadAsyncCall without using PluginMainThreadScheduler
Comment 1 Anders Carlsson 2015-01-06 12:22:49 PST
Created attachment 244089 [details]
Patch
Comment 2 Andreas Kling 2015-01-06 12:42:42 PST
Comment on attachment 244089 [details]
Patch

r=me
Comment 3 Anders Carlsson 2015-01-06 12:43:24 PST
Committed r177986: <http://trac.webkit.org/changeset/177986>
Comment 4 Darin Adler 2015-01-06 14:26:48 PST
Comment on attachment 244089 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=244089&action=review

> Source/WebKit/mac/Plugins/npapi.mm:184
> +    dispatch_async(dispatch_get_main_queue(), ^{
> +        if (!pluginView || !pluginView->plugin) {
> +            // The plug-in has already been destroyed.
> +            return;
> +        }
> +
> +        func(userData);
> +    });

Whether pluginView is null or not is already known before calling dispatch_async so that check seems like it should be outside the block.