1
- // Copyright (c) 2019, 2024 , Oracle and/or its affiliates.
1
+ // Copyright (c) 2019, 2025 , Oracle and/or its affiliates.
2
2
3
3
//-----------------------------------------------------------------------------
4
4
//
@@ -109,7 +109,7 @@ bool njsAqQueue_setRecipients(njsBaton *baton, dpiMsgProps *handle,
109
109
static bool njsAqQueue_createMessage (njsBaton * baton , njsAqQueue * queue ,
110
110
napi_env env , napi_value value , dpiMsgProps * * handle )
111
111
{
112
- napi_value payloadObj , constructor , tempObj ;
112
+ napi_value payloadObj , tempObj ;
113
113
dpiMsgProps * tempHandle ;
114
114
bool isDbObject ;
115
115
size_t bufferLength ;
@@ -133,10 +133,8 @@ static bool njsAqQueue_createMessage(njsBaton *baton, njsAqQueue *queue,
133
133
// set payload
134
134
NJS_CHECK_NAPI (env , napi_get_named_property (env , value , "payload" ,
135
135
& payloadObj ))
136
- NJS_CHECK_NAPI (env , napi_get_reference_value (env ,
137
- baton -> globals -> jsDbObjectConstructor , & constructor ))
138
- NJS_CHECK_NAPI (env , napi_instanceof (env , payloadObj , constructor ,
139
- & isDbObject ))
136
+ NJS_CHECK_NAPI (env , napi_instanceof (env , payloadObj ,
137
+ baton -> jsDbObjectConstructor , & isDbObject ))
140
138
if (isDbObject ) {
141
139
// DB Object
142
140
if (!njsDbObject_getInstance (baton -> globals , env , payloadObj , & obj ))
@@ -413,6 +411,9 @@ NJS_NAPI_METHOD_IMPL_ASYNC(njsAqQueue_enq, 1, NULL)
413
411
baton -> msgProps = calloc (baton -> numMsgProps , sizeof (dpiMsgProps * ));
414
412
if (!baton -> msgProps )
415
413
return njsBaton_setErrorInsufficientMemory (baton );
414
+
415
+ if (!njsBaton_setJsValues (baton , env ))
416
+ return false;
416
417
for (i = 0 ; i < baton -> numMsgProps ; i ++ ) {
417
418
NJS_CHECK_NAPI (env , napi_get_element (env , args [0 ], i , & message ))
418
419
if (!njsAqQueue_createMessage (baton , queue , env , message ,
0 commit comments