Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c84c30b
feat: pass inspector messages to a registered domain dispatcher if found
rigor789 Mar 23, 2023
f511a98
Merge branch 'dev' into feat/inspector-protocol-dev
rigor789 Mar 25, 2023
cb25bb3
feat: re-enable inspector handling for domains handled by core
rigor789 Mar 26, 2023
6bd2682
feat: add profiling methods (from android rt)
rigor789 Mar 26, 2023
330b868
refactor: store isolate on the JSV8InspectorClient
rigor789 Mar 26, 2023
f260da5
refactor(inspector): use a queue (FIFO) instead of a vector (LIFO)
rigor789 Mar 26, 2023
68186a2
fix: break on first module require with debug-brk
rigor789 Mar 26, 2023
51e451b
feat: print runtime version and v8 version in the same line
rigor789 Mar 26, 2023
15c4073
fix: debug-brk condition
rigor789 Mar 29, 2023
9a7c738
refactor: inspector message passing to js and back
rigor789 Mar 29, 2023
c74dac1
chore(release): 8.5.1-alpha.0
rigor789 Mar 29, 2023
0c99a7a
fix: reset session when the client connects
rigor789 Mar 30, 2023
ef16abb
fix: pass in the raw message as a 2nd argument to the domain handler
rigor789 Mar 30, 2023
6204b6b
Merge branch 'main' into feat/inspector-protocol-dev
rigor789 Mar 30, 2023
bd9168a
fix: don't try to log messages from different isolates
rigor789 Apr 13, 2023
aa3d9ec
feat: tracing agent
rigor789 Apr 19, 2023
598c643
fix: add proper locking and clean up
rigor789 Apr 19, 2023
c8759c1
chore: cleanup
rigor789 Apr 19, 2023
7b0d505
chore: remove Profiler (from android runtime/legacy)
rigor789 Apr 19, 2023
a77161a
chore: cleanup
rigor789 Apr 19, 2023
75ecc58
chore: remove extra whitespace
rigor789 Apr 19, 2023
ec6dd90
fix: Xcode 14.3 errors
rigor789 Apr 19, 2023
dcdaa1d
chore(release): 8.5.2-alpha.3
rigor789 Apr 19, 2023
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
2 changes: 1 addition & 1 deletion NativeScript/NativeScript-Prefix.pch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef NativeScript_Prefix_pch
#define NativeScript_Prefix_pch

#define NATIVESCRIPT_VERSION "8.5.1"
#define NATIVESCRIPT_VERSION "8.5.2-alpha.3"

#ifdef DEBUG
#define SIZEOF_OFF_T 8
Expand Down
3 changes: 1 addition & 2 deletions NativeScript/NativeScript.mm
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ - (instancetype)initWithConfig:(Config*)config {
runtime_->Init(isolate);
std::chrono::high_resolution_clock::time_point t2 = std::chrono::high_resolution_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count();
printf("Runtime initialization took %llims\n", duration);
printf("Runtime V8 Version %s\n", V8::GetVersion());
printf("Runtime initialization took %llims (version %s, V8 version %s)\n", duration, NATIVESCRIPT_VERSION, V8::GetVersion());

if (config.IsDebug) {
Isolate::Scope isolate_scope(isolate);
Expand Down
34 changes: 0 additions & 34 deletions NativeScript/inspector/JsV8InspectorClient.cpp

This file was deleted.

15 changes: 14 additions & 1 deletion NativeScript/inspector/JsV8InspectorClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "include/v8-inspector.h"
#include "src/inspector/v8-console-message.h"

#include "ns-v8-tracing-agent-impl.h"
#include "runtime/Runtime.h"

namespace v8_inspector {
Expand Down Expand Up @@ -46,14 +47,18 @@ class JsV8InspectorClient : V8InspectorClient, V8Inspector::Channel {
v8::Persistent<v8::Context> context_;
std::unique_ptr<V8InspectorSession> session_;
tns::Runtime* runtime_;
v8::Isolate* isolate_;
bool terminated_;
std::vector<std::string> messages_;
std::queue<std::string> messages_;
bool runningNestedLoops_;
dispatch_queue_t messagesQueue_;
dispatch_queue_t messageLoopQueue_;
dispatch_semaphore_t messageArrived_;
std::function<void (std::string)> sender_;
bool isWaitingForDebugger_;
bool hasScheduledDebugBreak_;

std::unique_ptr<tns::inspector::TracingAgentImpl> tracing_agent_;

// Override of V8InspectorClient
v8::Local<v8::Context> ensureDefaultContextInGroup(int contextGroupId) override;
Expand All @@ -67,6 +72,14 @@ class JsV8InspectorClient : V8InspectorClient, V8Inspector::Channel {
static void registerDomainDispatcherCallback(const v8::FunctionCallbackInfo<v8::Value>& args);
static void inspectorSendEventCallback(const v8::FunctionCallbackInfo<v8::Value>& args);
static void inspectorTimestampCallback(const v8::FunctionCallbackInfo<v8::Value>& args);

// {N} specific helpers
bool CallDomainHandlerFunction(v8::Local<v8::Context> context,
v8::Local<v8::Function> domainMethodFunc,
const v8::Local<v8::Object>& arg,
v8::Local<v8::Object>& domainDebugger,
v8::Local<v8::Value>& result);
std::string GetReturnMessageFromDomainHandlerResult(const v8::Local<v8::Value>& result, const v8::Local<v8::Value>& requestId);
};

}
Expand Down
Loading