| 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()); |
nothing calls this directly
no test coverage detected