Browse Source

Pull request #8288: CHART-23172 & CHART-23111 v7的jxbrowser没有正确关闭engine

Merge in DESIGN/design from ~WEI/design:final/11.0 to final/11.0

* commit '4a8fd982c54bb83a96e3ee05ee5a7b9b7f8feae5':
  v7的构造函数不能走v6的,会一直创建v6的Chromium进程,先搞个构造函数这样处理下..
  CHART-23172 & CHART-23111 v7的jxbrowser没有正确关闭engine
  Revert "CHART-23172 & CHART-23111 只处理没正确关闭engine"
  CHART-23172 & CHART-23111 只处理没正确关闭engine
  Revert "CHART-23172 & CHART-23111 v7的jxbrowser没有正确关闭engine"
  CHART-23172 & CHART-23111 v7的jxbrowser没有正确关闭engine
new-design
wei 3 years ago
parent
commit
df69a6368f
  1. 4
      designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java
  2. 6
      designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java

4
designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java

@ -203,6 +203,10 @@ public class ModernUIPane<T> extends BasicPane {
this.pane = new ModernUIPane<>(browserType);
}
public Builder(ModernUIPane<T> pane) {
this.pane = pane;
}
public Builder<T> prepare(ScriptContextListener contextListener) {
pane.browser.addScriptContextListener(contextListener);
return this;

6
designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java

@ -182,7 +182,7 @@ public class NewModernUIPane<T> extends ModernUIPane<T> {
public void disposeBrowser() {
if (browser != null) {
browser.close();
browser.engine().close();
browser = null;
}
@ -206,6 +206,10 @@ public class NewModernUIPane<T> extends ModernUIPane<T> {
private NewModernUIPane<T> pane = new NewModernUIPane<>();
public Builder() {
super((ModernUIPane<T>)null);
}
public NewModernUIPane.Builder<T> prepare(InjectJsCallback callback) {
pane.browser.set(InjectJsCallback.class, callback);
return this;

Loading…
Cancel
Save