Skip to content
Open
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
19 changes: 12 additions & 7 deletions test-app/app/src/main/java/com/tns/AndroidJsV8Inspector.java
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,20 @@ protected void onMessage(final NanoWSD.WebSocketFrame message) {

// Network.loadNetworkResource / IO.read / IO.close are served from
// disk on this thread so source maps load even while the isolate is
// paused at a breakpoint or busy running JS; Debugger.pause schedules
// a V8 interrupt and still flows through the queue.
// paused at a breakpoint or busy running JS; Target domain commands
// and worker-session messages (top-level sessionId) are routed here
// too. Debugger.pause schedules a V8 interrupt and still flows
// through the queue. A null return means "not handled" (queue it);
// an empty string means handled with nothing left to send.
String fastPathResponse = handleMessageOnSocketThread(message.getTextPayload());
if (fastPathResponse != null) {
try {
send(fastPathResponse);
} catch (IOException e) {
if (com.tns.Runtime.isDebuggable()) {
e.printStackTrace();
if (!fastPathResponse.isEmpty()) {
try {
send(fastPathResponse);
} catch (IOException e) {
if (com.tns.Runtime.isDebuggable()) {
e.printStackTrace();
}
}
}
return;
Expand Down
1 change: 1 addition & 0 deletions test-app/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ if (NOT OPTIMIZED_BUILD OR OPTIMIZED_WITH_INSPECTOR_BUILD)

src/main/cpp/com_tns_AndroidJsV8Inspector.cpp
src/main/cpp/JsV8InspectorClient.cpp
src/main/cpp/WorkerInspectorClient.cpp
src/main/cpp/v8_inspector/ns-v8-tracing-agent-impl.cpp
src/main/cpp/v8_inspector/Utils.cpp
)
Expand Down
Loading