Bug 932418: Don't create and throw away prompt when setting cookie string. r=bz
This commit is contained in:
@@ -2678,15 +2678,12 @@ _setvalueforurl(NPP instance, NPNURLVariable variable, const char *url,
|
||||
if (NS_FAILED(rv))
|
||||
return NPERR_GENERIC_ERROR;
|
||||
|
||||
nsCOMPtr<nsIPrompt> prompt;
|
||||
nsPluginHost::GetPrompt(nullptr, getter_AddRefs(prompt));
|
||||
|
||||
nsCOMPtr<nsIChannel> channel = GetChannelFromNPP(instance);
|
||||
|
||||
char *cookie = (char*)value;
|
||||
char c = cookie[len];
|
||||
cookie[len] = '\0';
|
||||
rv = cookieService->SetCookieString(uriIn, prompt, cookie, channel);
|
||||
rv = cookieService->SetCookieString(uriIn, nullptr, cookie, channel);
|
||||
cookie[len] = c;
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return NPERR_NO_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user