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

Method Keys

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

Source from the content-addressed store, hash-verified

232 }
233
234 void URLSearchParamsImpl::Keys(const v8::FunctionCallbackInfo<v8::Value> &args) {
235 URLSearchParamsImpl *ptr = GetPointer(args.This());
236 auto isolate = args.GetIsolate();
237 auto context = isolate->GetCurrentContext();
238 if (ptr == nullptr) {
239 args.GetReturnValue().Set(v8::Array::New(isolate));
240 return;
241 }
242
243 auto keys = ptr->GetURLSearchParams()->get_keys();
244
245 auto len = ptr->GetURLSearchParams()->size();
246 auto ret = v8::Array::New(isolate, len);
247 int i = 0;
248 while (keys.has_next()) {
249 auto key = keys.next();
250 if (key) {
251 auto keyValue = key.value();
252 ret->Set(context, i++, ArgConverter::ConvertToV8String(isolate, keyValue.data()));
253 }
254
255 }
256 args.GetReturnValue().Set(ret);
257
258 }
259
260 void URLSearchParamsImpl::Set(const v8::FunctionCallbackInfo<v8::Value> &args) {
261 URLSearchParamsImpl *ptr = GetPointer(args.This());

Callers

nothing calls this directly

Calls 12

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

Tested by

no test coverage detected