Lines Matching refs:args

46       const FunctionCallbackInfo<Value>& args);
48 static void New(const FunctionCallbackInfo<Value>& args);
49 static void WriteHeader(const FunctionCallbackInfo<Value>& args);
50 static void WriteValue(const FunctionCallbackInfo<Value>& args);
51 static void ReleaseBuffer(const FunctionCallbackInfo<Value>& args);
52 static void TransferArrayBuffer(const FunctionCallbackInfo<Value>& args);
53 static void WriteUint32(const FunctionCallbackInfo<Value>& args);
54 static void WriteUint64(const FunctionCallbackInfo<Value>& args);
55 static void WriteDouble(const FunctionCallbackInfo<Value>& args);
56 static void WriteRawBytes(const FunctionCallbackInfo<Value>& args);
77 static void New(const FunctionCallbackInfo<Value>& args);
78 static void ReadHeader(const FunctionCallbackInfo<Value>& args);
79 static void ReadValue(const FunctionCallbackInfo<Value>& args);
80 static void TransferArrayBuffer(const FunctionCallbackInfo<Value>& args);
81 static void GetWireFormatVersion(const FunctionCallbackInfo<Value>& args);
82 static void ReadUint32(const FunctionCallbackInfo<Value>& args);
83 static void ReadUint64(const FunctionCallbackInfo<Value>& args);
84 static void ReadDouble(const FunctionCallbackInfo<Value>& args);
85 static void ReadRawBytes(const FunctionCallbackInfo<Value>& args);
105 Local<Value> args[1] = { message };
115 arraysize(args),
116 args);
125 Local<Value> args[1] = { shared_array_buffer };
139 arraysize(args),
140 args);
150 Local<Value> args[1] = { input };
162 arraysize(args),
163 args);
171 void SerializerContext::New(const FunctionCallbackInfo<Value>& args) {
172 Environment* env = Environment::GetCurrent(args);
173 if (!args.IsConstructCall()) {
178 new SerializerContext(env, args.This());
181 void SerializerContext::WriteHeader(const FunctionCallbackInfo<Value>& args) {
183 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
187 void SerializerContext::WriteValue(const FunctionCallbackInfo<Value>& args) {
189 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
191 ctx->serializer_.WriteValue(ctx->env()->context(), args[0]);
193 if (ret.IsJust()) args.GetReturnValue().Set(ret.FromJust());
197 const FunctionCallbackInfo<Value>& args) {
199 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
201 bool value = args[0]->BooleanValue(ctx->env()->isolate());
205 void SerializerContext::ReleaseBuffer(const FunctionCallbackInfo<Value>& args) {
207 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
217 args.GetReturnValue().Set(buf.ToLocalChecked());
222 const FunctionCallbackInfo<Value>& args) {
224 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
226 Maybe<uint32_t> id = args[0]->Uint32Value(ctx->env()->context());
229 if (!args[1]->IsArrayBuffer())
233 Local<ArrayBuffer> ab = args[1].As<ArrayBuffer>();
238 void SerializerContext::WriteUint32(const FunctionCallbackInfo<Value>& args) {
240 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
242 Maybe<uint32_t> value = args[0]->Uint32Value(ctx->env()->context());
248 void SerializerContext::WriteUint64(const FunctionCallbackInfo<Value>& args) {
250 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
252 Maybe<uint32_t> arg0 = args[0]->Uint32Value(ctx->env()->context());
253 Maybe<uint32_t> arg1 = args[1]->Uint32Value(ctx->env()->context());
262 void SerializerContext::WriteDouble(const FunctionCallbackInfo<Value>& args) {
264 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
266 Maybe<double> value = args[0]->NumberValue(ctx->env()->context());
272 void SerializerContext::WriteRawBytes(const FunctionCallbackInfo<Value>& args) {
274 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
276 if (!args[0]->IsArrayBufferView()) {
281 ArrayBufferViewContents<char> bytes(args[0]);
325 void DeserializerContext::New(const FunctionCallbackInfo<Value>& args) {
326 Environment* env = Environment::GetCurrent(args);
327 if (!args.IsConstructCall()) {
332 if (!args[0]->IsArrayBufferView()) {
337 new DeserializerContext(env, args.This(), args[0]);
340 void DeserializerContext::ReadHeader(const FunctionCallbackInfo<Value>& args) {
342 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
346 if (ret.IsJust()) args.GetReturnValue().Set(ret.FromJust());
349 void DeserializerContext::ReadValue(const FunctionCallbackInfo<Value>& args) {
351 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
355 if (!ret.IsEmpty()) args.GetReturnValue().Set(ret.ToLocalChecked());
359 const FunctionCallbackInfo<Value>& args) {
361 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
363 Maybe<uint32_t> id = args[0]->Uint32Value(ctx->env()->context());
366 if (args[1]->IsArrayBuffer()) {
367 Local<ArrayBuffer> ab = args[1].As<ArrayBuffer>();
372 if (args[1]->IsSharedArrayBuffer()) {
373 Local<SharedArrayBuffer> sab = args[1].As<SharedArrayBuffer>();
383 const FunctionCallbackInfo<Value>& args) {
385 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
387 args.GetReturnValue().Set(ctx->deserializer_.GetWireFormatVersion());
390 void DeserializerContext::ReadUint32(const FunctionCallbackInfo<Value>& args) {
392 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
397 return args.GetReturnValue().Set(value);
400 void DeserializerContext::ReadUint64(const FunctionCallbackInfo<Value>& args) {
402 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
417 return args.GetReturnValue().Set(Array::New(isolate, ret, arraysize(ret)));
420 void DeserializerContext::ReadDouble(const FunctionCallbackInfo<Value>& args) {
422 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
427 return args.GetReturnValue().Set(value);
431 const FunctionCallbackInfo<Value>& args) {
433 ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
435 Maybe<int64_t> length_arg = args[0]->IntegerValue(ctx->env()->context());
450 args.GetReturnValue().Set(offset);