Page MenuHomeWildfire Games

Specialize ToJSVal<CRect> and remove PSERROR_Scripting_ConversionFailed that is never thrown
ClosedPublic

Authored by elexis on Sep 4 2019, 3:23 PM.

Details

Summary

This is a very small cleanup taken from D2142. Having the CRect conversion in an own function makes it consistent with all the other JS conversions, makes it easier to focus on the conversion for the one implementing it, and makes it reusable from other places.

Test Plan

Possibly develop an urge for better exception handling. Notice FromJSVal and the SpiderMonkey JS functions return a boolean, so it would seem logical in the long run to change ToJSVal from void to bool.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

elexis created this revision.Sep 4 2019, 3:23 PM
Vulcan added a comment.Sep 4 2019, 3:28 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/70/display/redirect

Vulcan added a comment.Sep 4 2019, 3:47 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/579/display/redirect

This revision was not accepted when it landed; it landed in state Needs Review.Sep 4 2019, 6:15 PM
This revision was automatically updated to reflect the committed changes.