Changeset 20296 in webkit
- Timestamp:
- Mar 18, 2007 4:25:01 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r20295 r20296 1 2007-03-18 Dan Waylonis <waylonis@mac.com> 2 3 Reviewed by Tim Hatcher. 4 5 Tests for http://bugs.webkit.org/show_bug.cgi?id=13005 6 Bug 13005: WebScriptObject +throwException needs NULL check. 7 8 A plugin that throws on dealloc can crash WebKit. 9 10 * plugins/throw-on-dealloc-expected.txt: Added. 11 * plugins/throw-on-dealloc.html: Added. 12 1 13 2007-03-18 Geoffrey Garen <ggaren@apple.com> 2 14 -
trunk/WebCore/ChangeLog
r20295 r20296 1 2007-03-18 Dan Waylonis <waylonis@mac.com> 2 3 Reviewed by Tim Hatcher. 4 5 Fix http://bugs.webkit.org/show_bug.cgi?id=13005 6 Bug 13005: WebScriptObject +throwException needs NULL check. 7 8 Add checking for NULL interpreter before throwing exception. 9 10 * bindings/objc/WebScriptObject.mm: 11 (+[WebScriptObject throwException:]): 12 1 13 2007-03-18 Geoffrey Garen <ggaren@apple.com> 2 14 -
trunk/WebCore/bindings/objc/WebScriptObject.mm
r20240 r20296 169 169 first = interp; 170 170 do { 171 if (!interp) 172 return NO; 173 171 174 // If the interpreter has a context, we set the exception. 172 175 if (interp->context()) { -
trunk/WebKitTools/ChangeLog
r20141 r20296 1 2007-03-18 Dan Waylonis <waylonis@mac.com> 2 3 Reviewed by Tim Hatcher. 4 5 DumpRenderTree changes for http://bugs.webkit.org/show_bug.cgi?id=13005 6 Bug 13005: WebScriptObject +throwException needs NULL check. 7 8 Add tests to ensure that a plugin can safely throw an exception in dealloc. 9 10 * DumpRenderTree/ObjCPlugin.h: 11 * DumpRenderTree/ObjCPlugin.m: 12 (+[ObjCPlugin webScriptNameForKey:]): 13 (+[ObjCPlugin isKeyExcludedFromWebScript:]): 14 (-[ObjCPlugin dealloc]): 15 1 16 2007-03-13 Mark Rowe <mrowe@apple.com> 2 17 -
trunk/WebKitTools/DumpRenderTree/ObjCPlugin.h
r15020 r20296 29 29 @interface ObjCPlugin : NSObject 30 30 { 31 BOOL throwOnDealloc; 31 32 } 32 33 -
trunk/WebKitTools/DumpRenderTree/ObjCPlugin.m
r16118 r20296 158 158 } 159 159 160 + (NSString *)webScriptNameForKey:(const char *)key 161 { 162 if (strcmp(key, "throwOnDealloc") == 0) 163 return @"throwOnDealloc"; 164 165 return nil; 166 } 167 168 + (BOOL)isKeyExcludedFromWebScript:(const char *)key 169 { 170 if (strcmp(key, "throwOnDealloc") == 0) 171 return NO; 172 173 return YES; 174 } 175 160 176 - (void)removeBridgeRestrictions:(id)container 161 177 { … … 180 196 } 181 197 182 @end 198 - (void)dealloc 199 { 200 if (throwOnDealloc) 201 [WebScriptObject throwException:@"Throwing exception on dealloc of ObjCPlugin"]; 202 203 [super dealloc]; 204 } 205 206 @end
Note: See TracChangeset
for help on using the changeset viewer.