navigator.plugins.refresh and WKContextRefreshPlugIns doesn't pick up changes to...
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jan 2017 23:55:37 +0000 (23:55 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jan 2017 23:55:37 +0000 (23:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=166942
rdar://problem/29839194

Reviewed by Sam Weinig.

Source/WebKit2:

Use _CFBundleCreateUnique so the resulting bundle won't be cached.

* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::getPluginInfo):

Source/WTF:

* wtf/spi/cf/CFBundleSPI.h:
Add SPI declaration.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210603 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WTF/ChangeLog
Source/WTF/wtf/spi/cf/CFBundleSPI.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm

index 02656cd..0a057f9 100644 (file)
@@ -1,3 +1,14 @@
+2017-01-11  Anders Carlsson  <andersca@apple.com>
+
+        navigator.plugins.refresh and WKContextRefreshPlugIns doesn't pick up changes to already-present plug-ins
+        https://bugs.webkit.org/show_bug.cgi?id=166942
+        rdar://problem/29839194
+
+        Reviewed by Sam Weinig.
+
+        * wtf/spi/cf/CFBundleSPI.h:
+        Add SPI declaration.
+
 2017-01-06  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
 
         [GTK] Should support key and code properties on keyboard events
index aae91ec..c089e17 100644 (file)
@@ -38,6 +38,7 @@ WTF_EXTERN_C_BEGIN
 
 void _CFBundleSetupXPCBootstrap(xpc_object_t bootstrap);
 
+CFBundleRef _CFBundleCreateUnique(CFAllocatorRef, CFURLRef bundleURL);
 Boolean CFBundleGetLocalizationInfoForLocalization(CFStringRef localizationName, SInt32 *languageCode, SInt32 *regionCode, SInt32 *scriptCode, CFStringEncoding *stringEncoding);
 CFStringRef CFBundleCopyLocalizationForLocalizationInfo(SInt32 languageCode, SInt32 regionCode, SInt32 scriptCode, CFStringEncoding stringEncoding);
 
index 1ac297f..2aae540 100644 (file)
@@ -1,5 +1,18 @@
 2017-01-11  Anders Carlsson  <andersca@apple.com>
 
+        navigator.plugins.refresh and WKContextRefreshPlugIns doesn't pick up changes to already-present plug-ins
+        https://bugs.webkit.org/show_bug.cgi?id=166942
+        rdar://problem/29839194
+
+        Reviewed by Sam Weinig.
+
+        Use _CFBundleCreateUnique so the resulting bundle won't be cached.
+
+        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
+        (WebKit::NetscapePluginModule::getPluginInfo):
+
+2017-01-11  Anders Carlsson  <andersca@apple.com>
+
         REGRESSION: Crash in com.apple.WebKit: IPC::Connection::sendMessage(std::__1::unique_ptr<IPC::MachMessage, std::__1::default_delete<IPC::MachMessage> >) + 27
         https://bugs.webkit.org/show_bug.cgi?id=165854
         rdar://problem/29757269
index 862c09c..2ee7c7d 100644 (file)
@@ -32,6 +32,7 @@
 #import "PluginSandboxProfile.h"
 #import <wtf/HashSet.h>
 #import <wtf/MainThread.h>
+#import <wtf/spi/cf/CFBundleSPI.h>
 
 using namespace WebCore;
 
@@ -208,7 +209,7 @@ bool NetscapePluginModule::getPluginInfo(const String& pluginPath, PluginModuleI
     RetainPtr<CFURLRef> bundleURL = adoptCF(CFURLCreateWithFileSystemPath(kCFAllocatorDefault, pluginPath.createCFString().get(), kCFURLPOSIXPathStyle, false));
     
     // Try to initialize the bundle.
-    RetainPtr<CFBundleRef> bundle = adoptCF(CFBundleCreate(kCFAllocatorDefault, bundleURL.get()));
+    RetainPtr<CFBundleRef> bundle = adoptCF(_CFBundleCreateUnique(kCFAllocatorDefault, bundleURL.get()));
     if (!bundle)
         return false;