Opened 6 years ago

Last modified 5 years ago

#5128 new defect

Add a way to convert JS::Values to C++ in a strongly-typed way

Reported by: Itms Owned by:
Priority: Should Have Milestone: Backlog
Component: Core engine Keywords:
Cc: Krinkle Patch:

Description

Currently ScriptInterface::FromJSVal doesn't entirely check the type of the C++ variable that will hold the value. For instance if a JS boolean is converted into a C++ integer, it will become 0 or 1 instead of erroring out.

This makes sense in a lot of cases but we should have a secure way to perform a few sensitive conversions instead of relying on isNumber() and the like.

Change History (1)

comment:1 by Krinkle, 5 years ago

Cc: Krinkle added
Note: See TracTickets for help on using tickets.