-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #1078 ## What is this PR doing? If fixes an Asyncify error and memory leak when running PHP shutdown functions. ## What problem is it solving? It adds full support for PHP shutdown functions and prevents crashes. ## How is the problem addressed? By adding Asyncify support for `wasm_sapi_request_shutdown` and preventing `free` from running if memory wasn't allocated. ## Testing Instructions - Checkout this branch - Run dev env `npm run dev` - [Open this URL](http://localhost:5400/website-server/?php=8.0&wp=latest&storage=none&networking=yes#{%20%22landingPage%22:%20%22/wp-admin/%22,%20%22features%22:%20{%20%22networking%22:%20true%20},%20%22steps%22:%20[%20{%20%22step%22:%20%22login%22%20},%20{%20%22step%22:%20%22writeFile%22,%20%22path%22:%20%22/wordpress/wp-content/mu-plugins/rewrite.php%22,%20%22data%22:%20%22%3C?php%20add_action(%20'shutdown',%20function()%20{%20post_message_to_js('test');%20}%20);%22%20}%20]%20}) and confirm that WP loads without Asyncify errors and and memory leaks (check the browser console)
- Loading branch information
Showing
59 changed files
with
404 additions
and
343 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains 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
Oops, something went wrong.