Closed kstenerud closed 10 months ago
Bugsnag.framework
binary size increased by 144 bytes from 713,104 to 713,248
FILE SIZE VM SIZE
-------------- --------------
+0.3% +636 +0.3% +636 __TEXT,__text
+0.1% +80 +0.1% +80 Symbol Table
+0.0% +64 +0.0% +64 String Table
+0.1% +24 +0.1% +24 __DATA,__objc_const
+0.1% +18 +0.1% +18 __TEXT,__objc_methname
+0.2% +8 +0.2% +8 __DATA,__objc_selrefs
+0.1% +4 +0.1% +4 __TEXT,__unwind_info
-0.5% -32 -0.2% -32 [__DATA]
[ = ] 0 -1.8% -144 [__LINKEDIT]
-3.4% -658 -3.4% -658 [__TEXT]
+0.0% +144 [ = ] 0 TOTAL
Generated by :no_entry_sign: Danger
Goal
Setting user fields to nil wouldn't clear out their values when serializing a report because [user toJson] would produce dictionaries with the null fields missing, and then when merged with the existing data the old data would remain (because there's no new field value to override the old).
This PR ensures that the user object's produced dictionary always contains all keys, even if they've been set to null.
Testing
Added unit tests.