mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Convert CGTraitInterface to use safe JSContext instead of raw JSContext
This commit is contained in:
parent
808fa65aef
commit
2c5d0a6ebc
43 changed files with 443 additions and 528 deletions
|
@ -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()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue