Make CJS_Object's ObjDefnID be one-based.
Then use 0 as the invalid object id instead of -1.
Then stop shipping about 80 bytes of "-1" as mutable data, since
zero-initialized .bss doesn't cost anything size-wise.
Change-Id: I79956d85e0e2114038d6f67e11954451097d7d19
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/74970
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fxjs/cjs_field.cpp b/fxjs/cjs_field.cpp
index 17b6a40..fe762ff 100644
--- a/fxjs/cjs_field.cpp
+++ b/fxjs/cjs_field.cpp
@@ -586,11 +586,11 @@
{"signatureSign", signatureSign_static},
{"signatureValidate", signatureValidate_static}};
-int CJS_Field::ObjDefnID = -1;
+uint32_t CJS_Field::ObjDefnID = 0;
const char CJS_Field::kName[] = "Field";
// static
-int CJS_Field::GetObjDefnID() {
+uint32_t CJS_Field::GetObjDefnID() {
return ObjDefnID;
}