Skip to content

Debugger fix #1289

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

Merged
merged 3 commits into from
Feb 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
5.2.1
==

## Bug Fixes
- [Breakpoint stop to hit when you have two open tabs and close one(#1247)](https://github.com/NativeScript/android-runtime/issues/1247)

5.2.0
==

Expand All @@ -13,7 +19,6 @@
- [ClassNotFound exception when calling nested static class with correct argument(#1195)](https://github.com/NativeScript/android-runtime/issues/1195)
- [If you refresh or close the chrome dev tools window an error will be log in the console (#1202)](https://github.com/NativeScript/android-runtime/issues/1202)
- [Debug on Android fails when stopped on breakpoint and change in .xml/.css/.html is applied(#1243)](https://github.com/NativeScript/android-runtime/issues/1243)
- [Breakpoint stop to hit when you have two open tabs and close one(#1247)](https://github.com/NativeScript/android-runtime/issues/1247)
- [Upgrade V8 to v7 to fix unstable sort() method(#1176)](https://github.com/NativeScript/android-runtime/issues/1176)
- [CodeCache option is broken since Android Runtime 4.1.0(#1235)](https://github.com/NativeScript/android-runtime/issues/1235)
- [Snapshots with ABI splits do not work since Android Runtime 4.1.0(#1234)](https://github.com/NativeScript/android-runtime/issues/1234)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tns-android",
"description": "NativeScript Runtime for Android",
"version": "5.2.0",
"version": "5.2.1",
"repository": {
"type": "git",
"url": "https://github.com/NativeScript/android-runtime.git"
Expand Down
15 changes: 14 additions & 1 deletion test-app/app/src/main/java/com/tns/AndroidJsV8Inspector.java
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,22 @@ protected Response serveHttp(IHTTPSession session) {
return super.serveHttp(session);
}

private JsV8InspectorWebSocket webSocket;

@Override
protected WebSocket openWebSocket(IHTTPSession handshake) {
return new JsV8InspectorWebSocket(handshake, currentRuntimeLogger);
// close the previous webSocket
if(this.webSocket != null) {
try {
this.webSocket.close(WebSocketFrame.CloseCode.NormalClosure, "New browser connection is open", false);
} catch (IOException ioException) {
if(this.webSocket.getState() != State.CLOSED) {
Log.e("{N}.v8-inspector", "Error closing previous connection", ioException);
}
}
}
this.webSocket = new JsV8InspectorWebSocket(handshake, currentRuntimeLogger);
return this.webSocket;
}
}

Expand Down