Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLAT-13280] More robust crosstalk API, and also a permissive proxy class #357

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

kstenerud
Copy link
Contributor

Goal

Make the crosstalk API more robust, with stable and predictable return error values that help identify potential problems.

Also added a permissive proxy that gracefully degrades to a no-op when an unknown method or property is called.

These two classes can help make cross-library calling less painful by removing the need to put if statements around everything in order to avoid a crash or bad data.

Design

The code has been updated so that the CrossTalk API and also the client-side implementation in the unit tests can be used as templates for how to implement either in another library. This will cause code duplication, but I think it's preferable to causing yet another library dependency.

Testing

Added unit test to cover more edge cases.

Copy link

github-actions bot commented Dec 9, 2024

BugsnagPerformance.framework binary size increased by 4,296 bytes from 519,872 to 524,168

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +1.7% +2.05Ki  +1.7% +2.05Ki    String Table
  +2.0% +2.05Ki  +2.0% +2.05Ki    Symbol Table
  +1.7% +1.93Ki  +1.7% +1.93Ki    __TEXT,__text
  +3.7%    +680  +3.7%    +680    __DATA,__objc_const
  +2.3%    +288  +2.3%    +288    __TEXT,__objc_stubs
  +2.3%    +176  +2.3%    +176    __TEXT,__cstring
  +1.5%    +176  +1.5%    +176    __TEXT,__gcc_except_tab
  +1.1%    +166  +1.1%    +166    __TEXT,__objc_methname
  +0.7%     +86  +0.7%     +86    [10 Others]
  +4.5%     +80  +4.5%     +80    __DATA,__objc_data
  +1.6%     +80  +1.6%     +80    __TEXT,__unwind_info
  +2.0%     +64  +2.0%     +64    __DATA,__objc_selrefs
  +6.8%     +41  +6.8%     +41    __TEXT,__objc_classname
  +0.9%     +32  +0.9%     +32    Lazy Binding Info
  +0.4%     +32  +0.4%     +32    __DATA_CONST,__cfstring
  +2.0%     +24  +2.0%     +24    Function Start Addresses
  +2.3%     +24  +2.3%     +24    Rebase Info
  -1.8%     -40  -1.8%     -40    [__DATA_CONST]
 -12.4%    -860 -12.6%    -860    [__DATA]
  -6.3% -2.86Ki  -6.3% -2.86Ki    [__TEXT]
  [ = ]       0 -97.2% -4.20Ki    [__LINKEDIT]
  +0.8% +4.20Ki  [ = ]       0    TOTAL

Generated by 🚫 Danger

@kstenerud kstenerud force-pushed the PLAT-13280-crosstalk branch from 5485053 to 99a6f60 Compare December 9, 2024 13:44
@kstenerud kstenerud merged commit 990805f into next Dec 10, 2024
25 checks passed
@kstenerud kstenerud deleted the PLAT-13280-crosstalk branch December 10, 2024 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants