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

Method Entries

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

Source from the content-addressed store, hash-verified

124 }
125
126 void URLSearchParamsImpl::Entries(const v8::FunctionCallbackInfo<v8::Value> &args) {
127 URLSearchParamsImpl *ptr = GetPointer(args.This());
128 auto isolate = args.GetIsolate();
129 auto context = isolate->GetCurrentContext();
130 if (ptr == nullptr) {
131 args.GetReturnValue().Set(v8::Array::New(isolate));
132 return;
133 }
134
135 auto keys = ptr->GetURLSearchParams()->get_keys();
136 auto len = ptr->GetURLSearchParams()->size();
137 auto ret = v8::Array::New(isolate, len);
138 int i = 0;
139 while (keys.has_next()) {
140 auto key = keys.next();
141 if (key) {
142 auto keyValue = key.value();
143 auto value = ptr->GetURLSearchParams()->get(keyValue).value();
144 v8::Local<v8::Value> values[] = {
145 ArgConverter::ConvertToV8String(isolate, keyValue.data()),
146 ArgConverter::ConvertToV8String(isolate, value.data()),
147 };
148 ret->Set(context, i++, v8::Array::New(isolate, values, 2));
149 }
150
151 }
152 args.GetReturnValue().Set(ret);
153 }
154
155 void URLSearchParamsImpl::ForEach(const v8::FunctionCallbackInfo<v8::Value> &args) {
156 URLSearchParamsImpl *ptr = GetPointer(args.This());

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