After adding this code, Java Crashes
<pre>
browser.getEngine().getLoadWorker().stateProperty().addListener( new ChangeListener<Worker.State>() {
public void changed(ObservableValue<? extends Worker.State> p, Worker.State oldState, Worker.State newState) {
if (newState == Worker.State.SUCCEEDED) {
JSObject win = (JSObject) browser.getEngine().executeScript("window");
win.setMember("javacallback", listener);
}
}
});
</pre>
On the version 7u10 everything works fine
Netbeans project
https://drive.google.com/folderview?id=0Bz7309sTKJ2nanBCdUdwd3R4Tzg&usp=sharing
<pre>
browser.getEngine().getLoadWorker().stateProperty().addListener( new ChangeListener<Worker.State>() {
public void changed(ObservableValue<? extends Worker.State> p, Worker.State oldState, Worker.State newState) {
if (newState == Worker.State.SUCCEEDED) {
JSObject win = (JSObject) browser.getEngine().executeScript("window");
win.setMember("javacallback", listener);
}
}
});
</pre>
On the version 7u10 everything works fine
Netbeans project
https://drive.google.com/folderview?id=0Bz7309sTKJ2nanBCdUdwd3R4Tzg&usp=sharing
- duplicates
-
JDK-8087754 Creating a Java callback in JavaFX WebView causes HotSpot crash
- Closed