Bug 77260 - DRT pasteboard object should return the correct pasteboard name
Summary: DRT pasteboard object should return the correct pasteboard name
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac Unspecified
: P2 Normal
Assignee: Enrica Casucci
Depends on:
Blocks: 77261
  Show dependency treegraph
Reported: 2012-01-27 16:09 PST by Enrica Casucci
Modified: 2012-01-27 17:23 PST (History)
1 user (show)

See Also:

Pastch (2.29 KB, patch)
2012-01-27 16:32 PST, Enrica Casucci
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.