MCPcopy Create free account
hub / github.com/NativeScript/android / Values

Method Values

test-app/runtime/src/main/cpp/URLSearchParamsImpl.cpp:311–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309 }
310
311 void URLSearchParamsImpl::Values(const v8::FunctionCallbackInfo<v8::Value> &args) {
312 URLSearchParamsImpl *ptr = GetPointer(args.This());
313 auto isolate = args.GetIsolate();
314 auto context = isolate->GetCurrentContext();
315 if (ptr == nullptr) {
316 args.GetReturnValue().Set(v8::Array::New(isolate));
317 return;
318 }
319
320 auto keys = ptr->GetURLSearchParams()->get_keys();
321
322 auto len = ptr->GetURLSearchParams()->size();
323 auto ret = v8::Array::New(isolate, len);
324 int i = 0;
325 while (keys.has_next()) {
326 auto key = keys.next();
327 if (key) {
328 auto value = ptr->GetURLSearchParams()->get(key.value());
329 if (value.has_value()) {
330 ret->Set(context, i++,
331 ArgConverter::ConvertToV8String(isolate, std::string(value.value())));
332 }
333
334 }
335
336 }
337 args.GetReturnValue().Set(ret);
338
339 }
340
341
342 url_search_params *URLSearchParamsImpl::GetURLSearchParams() {

Callers

nothing calls this directly

Calls 13

NewFunction · 0.85
ThisMethod · 0.80
GetReturnValueMethod · 0.80
GetURLSearchParamsMethod · 0.80
has_nextMethod · 0.80
valueMethod · 0.80
getMethod · 0.65
GetIsolateMethod · 0.45
SetMethod · 0.45
get_keysMethod · 0.45
sizeMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected