Skip to content

8244579: Windows "User Objects" leakage with WebView #229

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

Closed
wants to merge 1 commit into from

Conversation

arun-joseph
Copy link
Member

@arun-joseph arun-joseph commented May 20, 2020

Cause: The Window Class RunLoopMessageWindow is never registered (this happens because registerRunLoopMessageWindowClass() is moved to MainThreadWin.cpp while openjfx uses MainThreadJava.cpp) and this causes every SetTimer() call in RunLoopWin.cpp to create a new user object instead of reusing the same object over again.

Fix: Call registerRunLoopMessageWindowClass() from MainThreadJava.cpp

Test: To verify open any webpage using WebView on WIndows, with and without the fix and compare the number of user objects created using Windows Task Manager.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8244579: Windows "User Objects" leakage with WebView

Reviewers

  • Guru Hb (ghb - Reviewer)
  • Kevin Rushforth (kcr - Reviewer)

Download

$ git fetch https://git.openjdk.java.net/jfx pull/229/head:pull/229
$ git checkout pull/229

@bridgekeeper
Copy link

bridgekeeper bot commented May 20, 2020

👋 Welcome back ajoseph! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request.

@openjdk openjdk bot added the rfr Ready for review label May 20, 2020
@mlbridge
Copy link

mlbridge bot commented May 20, 2020

Webrevs

@kevinrushforth
Copy link
Member

/reviewers 2

@openjdk
Copy link

openjdk bot commented May 20, 2020

@kevinrushforth
The number of required reviews for this PR is now set to 2 (with at least 1 of role reviewers).

@kevinrushforth
Copy link
Member

Is there a way to create a test?

@arun-joseph
Copy link
Member Author

I think it will be difficult to write a test for this. While debugging, RunLoop was mostly used by threads managing heap. It can't be directly accessed via JavaScript. Also, this issue only affects Windows. The best way would be to monitor the user objects created.

@johanvos
Copy link
Collaborator

https://bugs.openjdk.java.net/browse/JDK-8244579 refers to a manual test, but it's probably very hard to automate this.

Copy link
Contributor

@guruhb guruhb left a comment

Choose a reason for hiding this comment

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

Looks good to me
Tested with your fix and ran Test case provided in JBS (WebViewUserObjectLeakage) didn't exceeds more than 50 user objects (Which is same as in 14-GA build).

@openjdk
Copy link

openjdk bot commented May 21, 2020

@arun-joseph This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

8244579: Windows "User Objects" leakage with WebView

Reviewed-by: ghb, kcr
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /issue command.

Since the source branch of this PR was last updated there have been 2 commits pushed to the master branch:

  • 37b5edc: 8245456: MacPasteboard throws ClassCastException on static builds
  • 6e03930: 8237602: TabPane doesn't respect order of TabPane.getTabs() list

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge master into your branch, and then specify the current head hash when integrating, like this: /integrate 37b5edc718c7538086938712f2d69ef4690c343a.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Ready to be integrated label May 21, 2020
@arun-joseph
Copy link
Member Author

/integrate

@openjdk openjdk bot closed this May 21, 2020
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Ready to be integrated rfr Ready for review labels May 21, 2020
@openjdk
Copy link

openjdk bot commented May 21, 2020

@arun-joseph The following commits have been pushed to master since your change was applied:

  • 37b5edc: 8245456: MacPasteboard throws ClassCastException on static builds
  • 6e03930: 8237602: TabPane doesn't respect order of TabPane.getTabs() list

Your commit was automatically rebased without conflicts.

Pushed as commit a13a642.

@arun-joseph arun-joseph deleted the 8244579 branch May 21, 2020 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants