Skip to content

Bug 2052638 - Handle isDomainJoined property throwing r?gcp!#1109

Open
lissyx wants to merge 1 commit into
mozilla:enterprise-mainfrom
lissyx:enterprise-bug2052638_deviceJoinedPlatform
Open

Bug 2052638 - Handle isDomainJoined property throwing r?gcp!#1109
lissyx wants to merge 1 commit into
mozilla:enterprise-mainfrom
lissyx:enterprise-bug2052638_deviceJoinedPlatform

Conversation

@lissyx

@lissyx lissyx commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Description

Bugzilla: Bug-2052638

Default isDomainJoined to false and handle throwing from getPropertyAsBool

@lissyx lissyx requested a review from gcp July 4, 2026 06:57
@lissyx lissyx self-assigned this Jul 4, 2026
@lissyx lissyx added the branch:main PR that should be merged on enterprise-main branch label Jul 4, 2026
@lissyx lissyx force-pushed the enterprise-bug2052638_deviceJoinedPlatform branch from 2e5c648 to 491d5dd Compare July 4, 2026 06:58
@gcp gcp requested a review from Copilot July 4, 2026 07:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 isDomainJoined to false during device posture collection.
  • Guard isDomainJoined retrieval 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 gcp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch:main PR that should be merged on enterprise-main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants