[webkit-reviews] review granted: [Bug 99528] [WebKit2] Create Objective-C API for adding and removing user scripts : [Attachment 169064] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 16 17:43:28 PDT 2012


Anders Carlsson <andersca at apple.com> has granted Andy Estes
<aestes at apple.com>'s request for review:
Bug 99528: [WebKit2] Create Objective-C API for adding and removing user
scripts
https://bugs.webkit.org/show_bug.cgi?id=99528

Attachment 169064: Patch
https://bugs.webkit.org/attachment.cgi?id=169064&action=review

------- Additional Comments from Anders Carlsson <andersca at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=169064&action=review


> Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroup.mm:125
> +- (void)addUserScript:(NSString *)source baseURL:(NSURL *)baseURL
whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist
injectionTime:(WKUserScriptInjectionTime)injectionTime
mainFrameOnly:(BOOL)mainFrameOnly

I think we should use more descriptive names for the whitelist and blacklist.
How about whitelistedURLPatterns and blacklistedURLPatterns.

> Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroup.mm:128
> +    if (!source)
> +	   return;

I think it's an error for source to be null, so we should not return early in
that case. Ideally we'd throw an invalid argument exception but crashing is
fine for now.


More information about the webkit-reviews mailing list