Summary: | [WK2] Remove obsolete plug-in sandboxing code | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alexey Proskuryakov <ap> | ||||||
Component: | WebKit2 | Assignee: | Alexey Proskuryakov <ap> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Alexey Proskuryakov
2013-01-18 23:45:10 PST
Created attachment 183606 [details]
proposed patch
Attachment 183606 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebKit2/ChangeLog:1: ChangeLog entry has no bug number [changelog/bugnumber] [5]
Total errors found: 1 in 7 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 183607 [details]
regenerated the patch with a saved ChangeLog
Comment on attachment 183607 [details] regenerated the patch with a saved ChangeLog View in context: https://bugs.webkit.org/attachment.cgi?id=183607&action=review > Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm:328 > - RetainPtr<NSString> profileString = [[NSString alloc] initWithContentsOfURL:(NSURL *)sandboxURL.get() encoding:NSUTF8StringEncoding error:NULL]; > + RetainPtr<NSString> profileString = adoptNS([[NSString alloc] initWithContentsOfURL:(NSURL *)sandboxURL.get() encoding:NSUTF8StringEncoding error:NULL]); > if (!profileString) > return; > > - enterSandbox([profileString.get() UTF8String], 0, 0); > + enterSandbox([profileString.get() UTF8String]); Seems crazy to decode UTF-8 then re-encode as UTF8. If we want to use initWIthContentsOfURL: then I think we should use the one on NSData, not NSString, here. Comment on attachment 183607 [details] regenerated the patch with a saved ChangeLog View in context: https://bugs.webkit.org/attachment.cgi?id=183607&action=review >> Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm:328 >> + enterSandbox([profileString.get() UTF8String]); > > Seems crazy to decode UTF-8 then re-encode as UTF8. If we want to use initWIthContentsOfURL: then I think we should use the one on NSData, not NSString, here. Another way to put it is, this is a really roundabout way to add a 0 byte to the end of some data. Comment on attachment 183607 [details]
regenerated the patch with a saved ChangeLog
Thank you for the review!
Switching to NSData is a good idea, I'll probably do it when touching this code the next time.
Comment on attachment 183607 [details] regenerated the patch with a saved ChangeLog Clearing flags on attachment: 183607 Committed r140274: <http://trac.webkit.org/changeset/140274> All reviewed patches have been landed. Closing bug. |