Skip to content

Commit 221e358

Browse files
committed
Fix function name and use safer string formatting in JavaScript module
Fix github actions CICD errors.
1 parent 8d86711 commit 221e358

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

register_types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class EditorExportJavaScript : public EditorExportPlugin {
5252
return;
5353
}
5454
}
55-
virtual String _get_name() const override { return "JavaScript"; }
55+
virtual String get_name() const override { return "JavaScript"; }
5656
};
5757

5858
#endif

thirdparty/quickjs/quickjs/quickjs-debugger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static int js_transport_write_message_newline(JSDebuggerInfo *info, const char*
4343
// not efficient, but protocol is then human readable.
4444
char message_length[JS_TRANSPORT_WRITE_MESSAGE_NEWLINE_MESSAGE_LENGTH];
4545
message_length[9] = '\0';
46-
sprintf_s(message_length, JS_TRANSPORT_WRITE_MESSAGE_NEWLINE_MESSAGE_LENGTH, "%08x\n", (int)len + 1);
46+
snprintf(message_length, JS_TRANSPORT_WRITE_MESSAGE_NEWLINE_MESSAGE_LENGTH, "%08x\n", (int)len + 1);
4747
if (!js_transport_write_fully(info, message_length, 9))
4848
return 0;
4949
int ret = js_transport_write_fully(info, value, len);

thirdparty/quickjs/quickjs/quickjs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <inttypes.h>
2929
#include <string.h>
3030
#include <assert.h>
31+
#include <float.h>
3132
#if defined(_WIN32)
3233
// import struct timeval
3334
#include <winsock2.h>

thirdparty/quickjs/quickjs_binder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ void QuickJSBinder::initialize() {
12801280
if (List<String>::Element *E = args.find("--js-debugger-connect")) {
12811281
if (E->next() && E->next()->get().find(":") != -1) {
12821282
String address = E->next()->get();
1283-
Error err = debugger->connect(ctx, address);
1283+
Error err = debugger->connect_debugger(ctx, address);
12841284
if (err != OK) {
12851285
ERR_PRINT(vformat("Failed to connect to JavaScript debugger at %s", address));
12861286
}

thirdparty/quickjs/quickjs_debugger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Error QuickJSDebugger::attach_js_debugger(JSContext *ctx, Ref<StreamPeerTCP> p_p
7979
return ERR_CANT_CONNECT;
8080
}
8181

82-
Error QuickJSDebugger::connect(JSContext *ctx, const String &address) {
82+
Error QuickJSDebugger::connect_debugger(JSContext *ctx, const String &address) {
8383
this->ctx = ctx;
8484
this->runtime = JS_GetRuntime(ctx);
8585

thirdparty/quickjs/quickjs_debugger.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class QuickJSDebugger : public RefCounted {
3333
Error attach_js_debugger(JSContext *p_ctx, Ref<StreamPeerTCP> p_peer);
3434

3535
public:
36-
Error connect(JSContext *ctx, const String &address);
36+
Error connect_debugger(JSContext *ctx, const String &address);
3737
Error listen(JSContext *ctx, const String &address);
3838
void poll();
3939

0 commit comments

Comments
 (0)