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

Method V8SetPrivateValue

test-app/runtime/src/main/cpp/V8GlobalHelpers.cpp:135–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135bool tns::V8SetPrivateValue(Isolate* isolate, const Local<Object>& obj, const Local<String>& propName, const Local<Value>& value) {
136 auto privateKey = Private::ForApi(isolate, propName);
137 auto context = obj->CreationContext();
138 auto res = obj->SetPrivate(context, privateKey, value);
139
140 if (res.IsNothing()) {
141 stringstream ss;
142 ss << "Failed to Set Private Value for prop: " << ArgConverter::ConvertToString(propName).c_str() << endl;
143 throw tns::NativeScriptException(ss.str());
144 }
145
146 return res.FromMaybe(false);
147}
148
149void tns::V8GlobalHelpers::onDisposeIsolate(Isolate* isolate) {
150 isolateToPersistentSmartJSONStringify.erase(isolate);

Callers

nothing calls this directly

Calls 3

IsNothingMethod · 0.45
FromMaybeMethod · 0.45

Tested by

no test coverage detected