mirror of
https://github.com/servo/servo.git
synced 2025-10-13 15:00:28 +01:00
Remove JS::get/get_mut to enforce sound rooting practices.
This commit is contained in:
parent
d7b96db33c
commit
dfdda0098a
13 changed files with 114 additions and 131 deletions
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::js::{JS, JSRef};
|
||||
use dom::bindings::js::{JS, JSRef, Root};
|
||||
use dom::bindings::str::ByteString;
|
||||
use dom::bindings::utils::{Reflectable, Reflector};
|
||||
use dom::bindings::utils::jsstring_to_str;
|
||||
|
@ -316,7 +316,7 @@ impl<T: Reflectable+IDLInterface> FromJSValConvertible<()> for JS<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: Reflectable> ToJSValConvertible for JS<T> {
|
||||
impl<'a, 'b, T: Reflectable> ToJSValConvertible for Root<'a, 'b, T> {
|
||||
fn to_jsval(&self, cx: *JSContext) -> JSVal {
|
||||
self.reflector().to_jsval(cx)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue