Convert CGTraitInterface to use safe JSContext instead of raw JSContext

This commit is contained in:
marmeladema 2019-07-22 01:09:24 +01:00
parent 808fa65aef
commit 2c5d0a6ebc
43 changed files with 443 additions and 528 deletions

View file

@ -169,7 +169,7 @@ impl CompiledEventListener {
CommonEventHandler::ErrorEventHandler(ref handler) => {
if let Some(event) = event.downcast::<ErrorEvent>() {
let cx = object.global().get_cx();
rooted!(in(cx) let error = unsafe { event.Error(cx) });
rooted!(in(cx) let error = unsafe { event.Error(JSContext::from_ptr(cx)) });
let return_value = handler.Call_(
object,
EventOrString::String(event.Message()),