Migrated methods which used `js::jsapi::JSContext` and `script_runtime::JSContext` to use `js::context::JSContext`. Also imported methods from `js::rust::wrappers2` in place of the ones from `js::rust::wrappers` and `js::jsapi`. Method `internal_warn` has not been migrated to use `&mut JSContext` in this commit. Signed-off-by: Steve Sharon Sam <157230657+SteveSharonSam@users.noreply.github.com>
Resolved comments by reviewer: -Removing unwanted variables. -Importing `js::rust::wrappers2` functions -Changes to how `cx` is taken inside `rooted!` macro. Signed-off-by: Steve Sharon Sam <157230657+SteveSharonSam@users.noreply.github.com>
Co-authored-by: Gae24 <96017547+Gae24@users.noreply.github.com> Signed-off-by: Steve Sharon Sam <157230657+SteveSharonSam@users.noreply.github.com>