Changeset 142314 in webkit
- Timestamp:
- Feb 8, 2013 12:46:26 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r142310 r142314 1 2013-02-07 Anders Carlsson <andersca@apple.com> 2 3 Work around a bug in Flash where NSException objects can be released too early 4 https://bugs.webkit.org/show_bug.cgi?id=109242 5 <rdar://problem/13003470> 6 7 Reviewed by Darin Adler. 8 9 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: 10 (WebKit::NetscapePluginModule::determineQuirks): 11 Set the new plug-in quirk. 12 13 * Shared/Plugins/PluginQuirks.h: 14 Add a new plug-in quirk. 15 16 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: 17 (WebKit::NetscapePlugin::initialize): 18 Call platformPreInitialize. 19 20 * WebProcess/Plugins/Netscape/NetscapePlugin.h: 21 (NetscapePlugin): 22 Add platformPreInitialize. 23 24 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: 25 (WebKit::NSException_release): 26 Add new empty function. 27 28 (WebKit::NetscapePlugin::platformPreInitialize): 29 Patch -[NSException release] to be a no-op. 30 1 31 2013-02-08 Dean Jackson <dino@apple.com> 2 32 -
trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm
r138635 r142314 482 482 // Flash returns a retained Core Animation layer. 483 483 m_pluginQuirks.add(PluginQuirks::ReturnsRetainedCoreAnimationLayer); 484 485 // Flash has a bug where NSExceptions can be released too early. 486 m_pluginQuirks.add(PluginQuirks::LeakAllThrownNSExceptions); 484 487 } 485 488 -
trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h
r125081 r142314 69 69 AppendVersion3UserAgent, 70 70 71 // Whether all thrown NSExceptions should be leaked. 72 // <rdar://problem/13003470> Adobe Flash has a bug where exceptions are released too early. 73 LeakAllThrownNSExceptions, 74 71 75 #ifndef NP_NO_QUICKDRAW 72 76 // Allow the plug-in to use the QuickDraw drawing model, since we know that the plug-in -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
r138461 r142314 631 631 #endif 632 632 633 platformPreInitialize(); 634 633 635 NetscapePlugin* previousNPPNewPlugin = currentNPPNewPlugin; 634 636 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
r141372 r142314 153 153 const char* userAgent(); 154 154 155 void platformPreInitialize(); 155 156 bool platformPostInitialize(); 156 157 void platformDestroy(); -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm
r127047 r142314 190 190 #endif 191 191 192 static void NSException_release(id, SEL) 193 { 194 // Do nothing. 195 } 196 197 void NetscapePlugin::platformPreInitialize() 198 { 199 if (m_pluginModule->pluginQuirks().contains(PluginQuirks::LeakAllThrownNSExceptions)) { 200 // Patch -[NSException release] to not release the object. 201 static dispatch_once_t once; 202 dispatch_once(&once, ^{ 203 Class exceptionClass = [NSException class]; 204 Method exceptionReleaseMethod = class_getInstanceMethod(exceptionClass, @selector(release)); 205 class_replaceMethod(exceptionClass, @selector(release), reinterpret_cast<IMP>(NSException_release), method_getTypeEncoding(exceptionReleaseMethod)); 206 }); 207 } 208 } 209 192 210 bool NetscapePlugin::platformPostInitialize() 193 211 {
Note: See TracChangeset
for help on using the changeset viewer.