[cleanup] Fix use of deprecated v8 methods in cast extensions
Replace deprecated parameterless *Type*Value() methods with the *Type*Value(Local<Context>) equivalent method. Since these functions return a Maybe, use FromMaybe() on the return value to guarantee a return value even if the conversion could throw an exception. (In future many of these could be converted to use As<Int32>::Cast()->Value() if they had IsInt32 checks instead of IsNumber). This is the cast version of a chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/1153247 Bug: v8:7786 Change-Id: I09a59a7de133ec429fa1aea1c5350e8af8bc81c3 Reviewed-on: https://chromium-review.googlesource.com/1174730Reviewed-by:Luke Halliwell <halliwell@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#583194}
Showing
Please register or sign in to comment