mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 947902 - Make dumpHeapComplete ignore file args with --fuzzing-safe. r=billm
--HG-- extra : rebase_source : b9c2d6441b095cb92586a24d4471174c65173195
This commit is contained in:
parent
c097e70a19
commit
faefddd17b
@ -880,15 +880,17 @@ DumpHeapComplete(JSContext *cx, unsigned argc, jsval *vp)
|
||||
if (argc > i) {
|
||||
Value v = args[i];
|
||||
if (v.isString()) {
|
||||
JSString *str = v.toString();
|
||||
JSAutoByteString fileNameBytes;
|
||||
if (!fileNameBytes.encodeLatin1(cx, str))
|
||||
return false;
|
||||
const char *fileName = fileNameBytes.ptr();
|
||||
dumpFile = fopen(fileName, "w");
|
||||
if (!dumpFile) {
|
||||
JS_ReportError(cx, "can't open %s", fileName);
|
||||
return false;
|
||||
if (!fuzzingSafe) {
|
||||
JSString *str = v.toString();
|
||||
JSAutoByteString fileNameBytes;
|
||||
if (!fileNameBytes.encodeLatin1(cx, str))
|
||||
return false;
|
||||
const char *fileName = fileNameBytes.ptr();
|
||||
dumpFile = fopen(fileName, "w");
|
||||
if (!dumpFile) {
|
||||
JS_ReportError(cx, "can't open %s", fileName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
++i;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user