Bug 77260

Summary: DRT pasteboard object should return the correct pasteboard name
Product: WebKit Reporter: Enrica Casucci <enrica>
Component: Tools / TestsAssignee: Enrica Casucci <enrica>
Severity: Normal CC: ap
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 77261    
Description Flags
Pastch mitz: review+

Description Enrica Casucci 2012-01-27 16:09:55 PST
The current implementation returns nil regardless of the name used to create the pasteboard object.
Comment 1 Enrica Casucci 2012-01-27 16:32:35 PST
Created attachment 124396 [details]
Comment 2 mitz 2012-01-27 16:54:39 PST
Comment on attachment 124396 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=124396&action=review

r=me assuming you fix the memory management issue.

> Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.m:45
> +-(id)initWithName:(NSString*)name;

Needs a space before the *. A newline before this line wouldn’t hurt either.

> Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.m:91
> +- (id)initWithName:(NSString*)name

Needs a space before the *.

> Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.m:96
> +    pasteboardName = name;

You should -copy name here and -release pasteboardName in -dealloc.
Comment 3 Enrica Casucci 2012-01-27 17:00:05 PST
thanks for the review!
I'll fix the memory management issue.
Comment 4 Enrica Casucci 2012-01-27 17:13:08 PST
Comment 5 Enrica Casucci 2012-01-27 17:23:29 PST
Dan pointed out I should have used copy instead of initWithString.
Landed a follow-up fix.