[Webkit-unassigned] [Bug 105156] [EFL] Process launcher uses system() for wrapping the WebProcess when using WEB_PROCESS_CMD_PREFIX
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon May 13 06:28:04 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=105156
--- Comment #22 from Sergio Correia <sergio.correia at openbossa.org> 2013-05-13 06:26:28 PST ---
(From update of attachment 201462)
View in context: https://bugs.webkit.org/attachment.cgi?id=201462&action=review
>> Source/WebKit2/UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:40
>> + if (args) {
>
> We usually do the opposite in WebKit: Return early.
>
> if (!arg)
> return;
Noted.
>> Source/WebKit2/UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:63
>> + char** args = new char*[splitArgs.size() + 1]; // extra room for null
>
> We should probably adopt here instead of the return statement. Comment should start with a capital letter and end with a '.'.
Okay, I will update it to adopt here.
>> Source/WebKit2/UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:65
>> + for (i = 0; i < numArgs; ++i) {
>
> i can be declared here: size_t i = 0
Will do.
>>> Source/WebKit2/UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:67
>>> + args[i] = new char[param.length() + 1];
>>
>> why '+1' ?
>
> For the ending '\0' character I assume.
> "The strlen() function calculates the length of the string s, excluding the terminating null byte ('\0')."
>
> strlen() is called inside CString.
Yes, it's for the ending '\0'.
>From CString.h: // The data is implicitly allocated 1 character longer than length(), as it is zero-terminated.
>> Source/WebKit2/UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:68
>> + strcpy(args[i], param.data());
>
> strncpy?
Agreed.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list