Skip to content

Commit cf76258

Browse files
committedSep 23, 2022
chore: address review comments
1 parent 2a8872f commit cf76258

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed
 

‎src/main.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ async function main(filename, resourceName, resource, options) {
7575
`Segment and section with that name already exists: ${options.machoSegmentName}/${sectionName}`
7676
);
7777
console.log("Use --overwrite to overwrite the existing content");
78-
process.exit(2);
78+
process.exit(1);
7979
}
8080
}
8181
break;
@@ -96,7 +96,7 @@ async function main(filename, resourceName, resource, options) {
9696
if (result === postject.InjectResult.kAlreadyExists) {
9797
console.log(`Section with that name already exists: ${sectionName}`);
9898
console.log("Use --overwrite to overwrite the existing content");
99-
process.exit(2);
99+
process.exit(1);
100100
}
101101
}
102102
break;
@@ -118,15 +118,15 @@ async function main(filename, resourceName, resource, options) {
118118
`Resource with that name already exists: ${resourceName}`
119119
);
120120
console.log("Use --overwrite to overwrite the existing content");
121-
process.exit(2);
121+
process.exit(1);
122122
}
123123
}
124124
break;
125125
}
126126

127127
if (result !== postject.InjectResult.kSuccess) {
128128
console.log("Error when injecting resource");
129-
process.exit(3);
129+
process.exit(1);
130130
}
131131

132132
try {

‎src/postject.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ enum class ExecutableFormat { kELF, kMachO, kPE, kUnknown };
1414
enum class InjectResult { kAlreadyExists, kError, kSuccess };
1515

1616
std::vector<uint8_t> vec_from_val(const emscripten::val& value) {
17-
// NOTE - vecFromJSArray incurs a copy, so memory usage is higher than it
18-
// needs to be. Explore ways to access the memory directly and avoid
19-
// the copy.
17+
// TODO(dsanders11) - vecFromJSArray incurs a copy, so memory usage is higher
18+
// than it needs to be. Explore ways to access the memory
19+
// directly and avoid the copy.
2020
return emscripten::vecFromJSArray<uint8_t>(value);
2121
}
2222

0 commit comments

Comments
 (0)