Changeset 177986 in webkit
- Timestamp:
- Jan 6, 2015, 12:43:22 PM (11 years ago)
- Location:
- trunk/Source/WebKit/mac
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r177985 r177986 1 2015-01-06 Anders Carlsson <andersca@apple.com> 2 3 Reimplement NPN_PluginThreadAsyncCall without using PluginMainThreadScheduler 4 https://bugs.webkit.org/show_bug.cgi?id=140140 5 6 Reviewed by Andreas Kling. 7 8 Just use a dispatch_async call to the main queue. This will let us move PluginMainThreadScheduler 9 out of WebCore since nobody else is using it. 10 11 * Plugins/WebNetscapePluginView.h: 12 * Plugins/WebNetscapePluginView.mm: 13 (-[WebNetscapePluginView _createPlugin]): 14 (-[WebNetscapePluginView _destroyPlugin]): 15 * Plugins/npapi.mm: 16 (NPN_PluginThreadAsyncCall): 17 1 18 2015-01-06 Anders Carlsson <andersca@apple.com> 2 19 -
trunk/Source/WebKit/mac/Plugins/WebNetscapePluginView.h
r168047 r177986 61 61 @interface WebNetscapePluginView : WebBaseNetscapePluginView<WebPluginManualLoader, WebPluginContainerCheckController> 62 62 { 63 @package 63 64 RefPtr<WebNetscapePluginStream> _manualStream; 64 65 RetainPtr<CALayer> _pluginLayer; -
trunk/Source/WebKit/mac/Plugins/WebNetscapePluginView.mm
r170774 r177986 66 66 #import <WebCore/HTMLPlugInElement.h> 67 67 #import <WebCore/Page.h> 68 #import <WebCore/PluginMainThreadScheduler.h>69 68 #import <WebCore/ProxyServer.h> 70 69 #import <WebCore/ScriptController.h> … … 2359 2358 ASSERT(pluginFunctionCallDepth == 0); 2360 2359 2361 PluginMainThreadScheduler::scheduler().registerPlugin(plugin);2362 2363 2360 _isFlash = [_pluginPackage.get() bundleIdentifier] == "com.macromedia.Flash Player.plugin"; 2364 2361 _isSilverlight = [_pluginPackage.get() bundleIdentifier] == "com.microsoft.SilverlightPlugin"; … … 2375 2372 - (void)_destroyPlugin 2376 2373 { 2377 PluginMainThreadScheduler::scheduler().unregisterPlugin(plugin);2378 2379 2374 if (_isSilverlight) 2380 2375 [self _workaroundSilverlightFullscreenBug:NO]; -
trunk/Source/WebKit/mac/Plugins/npapi.mm
r168047 r177986 32 32 #import "WebNetscapePluginView.h" 33 33 #import "WebKitLogging.h" 34 #import <WebCore/PluginMainThreadScheduler.h>35 34 36 35 using namespace WebCore; … … 174 173 void NPN_PluginThreadAsyncCall(NPP instance, void (*func) (void *), void *userData) 175 174 { 176 PluginMainThreadScheduler::scheduler().scheduleCall(instance, func, userData); 175 WebNetscapePluginView *pluginView = pluginViewForInstance(instance); 176 177 dispatch_async(dispatch_get_main_queue(), ^{ 178 if (!pluginView || !pluginView->plugin) { 179 // The plug-in has already been destroyed. 180 return; 181 } 182 183 func(userData); 184 }); 177 185 } 178 186
Note:
See TracChangeset
for help on using the changeset viewer.