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

Method GetHostName

test-app/runtime/src/main/cpp/URLImpl.cpp:235–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233
234
235void URLImpl::GetHostName(v8::Local<v8::String> property,
236 const v8::PropertyCallbackInfo<v8::Value> &info) {
237 URLImpl *ptr = GetPointer(info.This());
238 if (ptr == nullptr) {
239 info.GetReturnValue().SetEmptyString();
240 return;
241 }
242 auto isolate = info.GetIsolate();
243 auto value = ptr->GetURL()->get_hostname();
244
245 info.GetReturnValue().Set(
246 ArgConverter::ConvertToV8String(isolate, value.data(), value.length()));
247}
248
249void URLImpl::SetHostName(v8::Local<v8::String> property,
250 v8::Local<v8::Value> value,

Callers

nothing calls this directly

Calls 9

ThisMethod · 0.80
SetEmptyStringMethod · 0.80
GetReturnValueMethod · 0.80
GetURLMethod · 0.80
get_hostnameMethod · 0.60
GetIsolateMethod · 0.45
SetMethod · 0.45
dataMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected