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

[TIMOB-26391](7_4_X) Improve proxy protection logic #10370

Merged
merged 4 commits into from Oct 5, 2018

Conversation

janvennemann
Copy link
Contributor

JIRA: https://jira.appcelerator.org/browse/TIMOB-26391

Optional Description:
Using the existing protect/unprotect methods caused unwanted side effects. This introduces two similar methods for the sole purpose of safeguarding the JS object during our proxy creation flow.

Using the existing protect/unprotect methods caused unwanted side effects. This introduces two similar methods for the sole purpose of safeguarding the JS object during our proxy creation flow.
@janvennemann janvennemann changed the title [TIMOB-26391] Improve proxy protection logic [TIMOB-26391](7_4_X) Improve proxy protection logic Oct 4, 2018
@vijaysingh-axway
Copy link
Contributor

Both apps are working fine at my end.

@vijaysingh-axway
Copy link
Contributor

Two methods which you have introduced-
-(void)applyGarbageCollectionSafeguard
-(void)removeGarbageCollectionSafeguard
Is similar to

  • (void)protectJsobject
  • (void)unprotectJsobject

Only difference I can see is updating location of bool ‘gcSafeguarded’ and ‘protecting’ in theses functions. Is bool value updating location is cause of some issue?

@janvennemann
Copy link
Contributor Author

janvennemann commented Oct 5, 2018

Both methods basically do the same, yes. The reason i introduced them is because the are operating on another flag. We use protectJsobject/unprotectJsobject in various other places and calling in https://github.com/appcelerator/titanium_mobile/pull/10370/files#diff-c486238fd67efff24b4b0a311e95c358L230 was causing the issues. With this fix only the initial protection during the proxy creation will be removed and not any protect calls which are required later during runtime.

Copy link
Contributor

@vijaysingh-axway vijaysingh-axway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR passed.

@build
Copy link
Contributor

build commented Oct 5, 2018

Messages
📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS

@vijaysingh-axway vijaysingh-axway merged commit aa1401e into tidev:7_4_X Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants