|
v8::Local<v8::Value> JSIV8ValueConverter::ToV8Value( |
|
const V8Runtime &runtime, |
|
const jsi::Value &value) { |
|
v8::EscapableHandleScope scopedHandle(runtime.isolate_); |
|
|
|
if (value.isUndefined()) { |
|
return scopedHandle.Escape(v8::Undefined(runtime.isolate_)); |
|
} else if (value.isNull()) { |
|
return scopedHandle.Escape(v8::Null(runtime.isolate_)); |
|
} else if (value.isBool()) { |
|
return scopedHandle.Escape( |
|
v8::Boolean::New(runtime.isolate_, std::move(value.getBool()))); |
|
} else if (value.isNumber()) { |
|
return scopedHandle.Escape( |
|
v8::Number::New(runtime.isolate_, std::move(value.getNumber()))); |
|
} else if (value.isString()) { |
|
return scopedHandle.Escape(ToV8String( |
|
runtime, std::move(value.getString(const_cast<V8Runtime &>(runtime))))); |
|
} else if (value.isObject()) { |
|
return scopedHandle.Escape(ToV8Object( |
|
runtime, std::move(value.getObject(const_cast<V8Runtime &>(runtime))))); |
|
} else { |
|
// What are you? |
|
std::abort(); |
It's not properly converting Symbols from JSI to V8 causing crash
react-native-v8/src/v8runtime/JSIV8ValueConverter.cpp
Lines 48 to 71 in 958a471
It's not properly converting Symbols from JSI to V8 causing crash