Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 #include <stdio.h>
2 #include "prenv.h"
4 int main(int argc, char* argv[])
5 {
6 if (argc != 2)
7 return 1;
9 const char* value = PR_GetEnv("WRITE_ARGUMENT_FILE");
11 if (!value)
12 return 2;
14 FILE* outfile = fopen(value, "w");
15 if (!outfile)
16 return 3;
18 // We only need to write out the first argument (no newline).
19 fputs(argv[argc -1], outfile);
21 fclose(outfile);
23 return 0;
24 }