Skip to content
This repository was archived by the owner on Nov 1, 2022. It is now read-only.
This repository was archived by the owner on Nov 1, 2022. It is now read-only.

Add comments explaining why SystemEngineView.initWebView can create WebViews; some duplication #1944

@mcomella

Description

@mcomella

In the main code path, a NestedWebView is created for each SystemEngineSession via its WebView variable:

This is passed from the session to the engineView in SystemEngineView.render:

However, sometimes this can be null apparently – NestedWebView can also created as a default argument in SystemEngineView.initWebView:

internal fun initWebView(webView: WebView = NestedWebView(context)): WebView {

There are two problems here:

  • There are no comments explaining why initWebView's default argument would need to be used (e.g. I don't know why)
  • The NestedWebView construction call is duplicated in two places (though init is shared)

I'm more concerned about the lack of comments than the duplicated constructor because the init is shared.

┆Issue is synchronized with this Jira Task

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions