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

Access the setTimeout-functionRefs correctly in SandboxSupportBase.destroy #15477

Merged
merged 1 commit into from
Sep 20, 2022

Conversation

Snuffleupagus
Copy link
Collaborator

This effectively replaces PR #15465.

As outlined in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach, the argument order when iterating through a Map is actually value, key. Ignoring the incorrect Array used in the old code, I cannot imagine that this would've worked anyway since we didn't use the actual setTimeout-functionRefs to clear the timeouts; please refer to the setTimeout/setInterval methods in the SandboxSupportBase.createSandboxExternals method.

….destroy`

*This effectively replaces PR 15465.*

As outlined in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach, the argument order when iterating through a `Map` is actually `value, key`.
Ignoring the incorrect Array used in the old code, I cannot imagine that this would've worked anyway since we didn't use the actual `setTimeout`-functionRefs to clear the timeouts; please refer to the `setTimeout`/`setInterval` methods in the `SandboxSupportBase.createSandboxExternals` method.
@Snuffleupagus
Copy link
Collaborator Author

/botio integrationtest

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/9bf0c1ba9ac4e0f/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/7f8e73855279671/output.txt

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.

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/7f8e73855279671/output.txt

Total script time: 4.93 mins

  • Integration Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/9bf0c1ba9ac4e0f/output.txt

Total script time: 12.71 mins

  • Integration Tests: FAILED

@Snuffleupagus Snuffleupagus merged commit ff8f850 into mozilla:master Sep 20, 2022
@Snuffleupagus Snuffleupagus deleted the sandbox-destroy-timeout branch September 20, 2022 13:34
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