| 176 | } |
| 177 | |
| 178 | int64_t ArgConverter::ConvertToJavaLong(Isolate* isolate, const Local<Value>& value) { |
| 179 | assert(!value.IsEmpty()); |
| 180 | |
| 181 | auto obj = Local<Object>::Cast(value); |
| 182 | |
| 183 | assert(!obj.IsEmpty()); |
| 184 | |
| 185 | auto context = isolate->GetCurrentContext(); |
| 186 | Local<Value> temp; |
| 187 | bool success = obj->Get(context, V8StringConstants::GetValue(isolate)).ToLocal(&temp); |
| 188 | assert(success && !temp.IsEmpty()); |
| 189 | auto valueProp = temp.As<Object>(); |
| 190 | |
| 191 | string num = ConvertToString(valueProp->ToString(context).ToLocalChecked()); |
| 192 | |
| 193 | int64_t longValue = atoll(num.c_str()); |
| 194 | |
| 195 | return longValue; |
| 196 | } |
| 197 | |
| 198 | ArgConverter::TypeLongOperationsCache* ArgConverter::GetTypeLongCache(v8::Isolate* isolate) { |
| 199 | TypeLongOperationsCache* cache; |