Bug 2052638 - Handle isDomainJoined property throwing r?gcp!#1109
Open
lissyx wants to merge 1 commit into
Open
Bug 2052638 - Handle isDomainJoined property throwing r?gcp!#1109lissyx wants to merge 1 commit into
lissyx wants to merge 1 commit into
Conversation
2e5c648 to
491d5dd
Compare
There was a problem hiding this comment.
Pull request overview
This PR hardens device-posture collection for enterprise console policy fetches by ensuring isDomainJoined is safely populated even when Services.sysinfo.getPropertyAsBool("isDomainJoined") throws.
Changes:
- Default
isDomainJoinedtofalseduring device posture collection. - Guard
isDomainJoinedretrieval with exception handling and use the resolved value in the payload.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+770
to
+775
| let isDomainJoined = false; | ||
| try { | ||
| isDomainJoined = Services.sysinfo.getPropertyAsBool("isDomainJoined"); | ||
| } catch { | ||
| // ... ? | ||
| } |
gcp
requested changes
Jul 4, 2026
gcp
left a comment
Contributor
There was a problem hiding this comment.
I think this is cleaner to express with ?? but also what you describe is not possible from the code. I want to understand what is going on.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Bugzilla: Bug-2052638
Default isDomainJoined to
falseand handle throwing fromgetPropertyAsBool