Changeset 117471 in webkit
- Timestamp:
- May 17, 2012 11:48:29 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r117470 r117471 1 2012-05-16 Andreas Kling <kling@webkit.org> 2 3 Make PluginInfoStore properly thread-safe. 4 <http://webkit.org/b/86648> 5 <rdar://problem/11451178> 6 7 Reviewed by Darin Adler. 8 9 * plugins/PluginData.h: 10 (WebCore::MimeClassInfo::isolatedCopy): 11 (WebCore::PluginInfo::isolatedCopy): 12 1 13 2012-05-17 Hironori Bono <hbono@chromium.org> 2 14 -
trunk/Source/WebCore/plugins/PluginData.h
r117108 r117471 35 35 Vector<String> extensions; 36 36 37 MimeClassInfo isolatedCopy() 37 MimeClassInfo isolatedCopy() const 38 38 { 39 39 MimeClassInfo clone; … … 57 57 Vector<MimeClassInfo> mimes; 58 58 59 PluginInfo isolatedCopy() 59 PluginInfo isolatedCopy() const 60 60 { 61 61 PluginInfo clone; -
trunk/Source/WebKit2/ChangeLog
r117470 r117471 1 2012-05-16 Andreas Kling <kling@webkit.org> 2 3 Make PluginInfoStore properly thread-safe. 4 <http://webkit.org/b/86648> 5 <rdar://problem/11451178> 6 7 Reviewed by Darin Adler. 8 9 Deep copy the internal storage of PluginInfoStore after constructing it, as we can 10 be doing this from a secondary thread. 11 12 * Shared/Plugins/PluginModuleInfo.h: 13 (WebKit::PluginModuleInfo::isolatedCopy): 14 * UIProcess/Plugins/PluginInfoStore.cpp: 15 (WebKit::deepIsolatedCopyPluginInfoVector): 16 (WebKit::PluginInfoStore::loadPluginsIfNecessary): 17 (WebKit::PluginInfoStore::plugins): 18 1 19 2012-05-17 Hironori Bono <hbono@chromium.org> 2 20 -
trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h
r117108 r117471 43 43 #endif 44 44 45 PluginModuleInfo isolatedCopy() 45 PluginModuleInfo isolatedCopy() const 46 46 { 47 47 PluginModuleInfo clone; -
trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp
r117108 r117471 70 70 #endif 71 71 72 static inline Vector<PluginModuleInfo> deepIsolatedCopyPluginInfoVector(const Vector<PluginModuleInfo>& vector) 73 { 74 // Let the copy begin! 75 Vector<PluginModuleInfo> copy; 76 copy.reserveCapacity(vector.size()); 77 for (unsigned i = 0; i < vector.size(); ++i) 78 copy.append(vector[i].isolatedCopy()); 79 return copy; 80 } 81 72 82 void PluginInfoStore::loadPluginsIfNecessary() 73 83 { … … 95 105 loadPlugin(plugins, *it); 96 106 97 m_plugins.swap(plugins); 107 m_plugins = deepIsolatedCopyPluginInfoVector(plugins); 108 98 109 m_pluginListIsUpToDate = true; 99 110 } … … 116 127 MutexLocker locker(m_pluginsLock); 117 128 loadPluginsIfNecessary(); 118 119 // Let the copy begin! 120 Vector<PluginModuleInfo> infos; 121 for (unsigned i = 0; i < m_plugins.size(); ++i) 122 infos.append(m_plugins[i].isolatedCopy()); 123 124 return infos; 129 return deepIsolatedCopyPluginInfoVector(m_plugins); 125 130 } 126 131
Note: See TracChangeset
for help on using the changeset viewer.