Skip to content

Pass the XRef-instance explicitly to the StructTreeRoot class, and simplify the StructElementNode.prototype.role getter #19719

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

Merged
merged 2 commits into from
Mar 25, 2025

Conversation

Snuffleupagus
Copy link
Collaborator

  • Pass the XRef-instance explicitly to the StructTreeRoot class

    This avoids the current situation where we're accessing it through various dictionaries, since that's a somewhat brittle solution given that in the general case a Dict-instance may not have the xref-field set (see e.g. the empty-Dict).

  • Simplify the StructElementNode.prototype.role getter a tiny bit

    Given that the roleMap only contains Name-strings, the lookup can be simplified thanks to modern JavaScript features.

@Snuffleupagus
Copy link
Collaborator Author

/botio test

This avoids the current situation where we're accessing it through various dictionaries, since that's a somewhat brittle solution given that in the general case a `Dict`-instance may not have the `xref`-field set (see e.g. the empty-Dict).
Given that the `roleMap` only contains `Name`-strings, the lookup can be simplified thanks to modern JavaScript features.
@mozilla mozilla deleted a comment from moz-tools-bot Mar 25, 2025
@mozilla mozilla deleted a comment from moz-tools-bot Mar 25, 2025
@mozilla mozilla deleted a comment from moz-tools-bot Mar 25, 2025
Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 1

Live output at: http://54.241.84.105:8877/54a2b09ab5cac29/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 1

Live output at: http://54.193.163.58:8877/77fbe70339d0776/output.txt

@Snuffleupagus
Copy link
Collaborator Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 2

Live output at: http://54.241.84.105:8877/1d73674a13413e4/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 2

Live output at: http://54.193.163.58:8877/1f65c82de2ada61/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/54a2b09ab5cac29/output.txt

Total script time: 2.38 mins

  • Unit Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/1d73674a13413e4/output.txt

Total script time: 12.72 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/77fbe70339d0776/output.txt

Total script time: 8.17 mins

  • Unit Tests: FAILED

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/1f65c82de2ada61/output.txt

Total script time: 28.84 mins

  • Integration Tests: Passed

@Snuffleupagus Snuffleupagus merged commit c6b9338 into mozilla:master Mar 25, 2025
9 checks passed
@Snuffleupagus Snuffleupagus deleted the structTree-xref branch March 25, 2025 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants