aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-12-24 16:15:45 -0700
committerbors-servo <metajack+bors@gmail.com>2014-12-24 16:15:45 -0700
commit57b6dc939734553287a02e3a42241715266995d5 (patch)
treec94028e78f0cf2dd5187b1effe725024a417dc70 /components/script
parent070008b4c43337b3ef4ef78b09f73e64b4d0be23 (diff)
parentbdb75c2146f3519a9526d589d25ae7c2499fcc56 (diff)
downloadservo-57b6dc939734553287a02e3a42241715266995d5.tar.gz
servo-57b6dc939734553287a02e3a42241715266995d5.zip
auto merge of #4479 : mattnenterprise/servo/globalref-by-value, r=jdm
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py2
-rw-r--r--components/script/dom/bindings/error.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 01efdd012c0..df7085e64d2 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -2215,7 +2215,7 @@ class CGCallGenerator(CGThing):
" Ok(result) => result,\n"
" Err(e) => {\n"
"%s"
- " throw_dom_exception(cx, &global.root_ref(), e);\n"
+ " throw_dom_exception(cx, global.root_ref(), e);\n"
" return%s;\n"
" },\n"
"};\n" % (glob, errorResult)))
diff --git a/components/script/dom/bindings/error.rs b/components/script/dom/bindings/error.rs
index 4cfdd3a0663..f9de48935dc 100644
--- a/components/script/dom/bindings/error.rs
+++ b/components/script/dom/bindings/error.rs
@@ -46,10 +46,10 @@ pub type Fallible<T> = Result<T, Error>;
pub type ErrorResult = Fallible<()>;
/// Set a pending DOM exception for the given `result` on `cx`.
-pub fn throw_dom_exception(cx: *mut JSContext, global: &GlobalRef,
+pub fn throw_dom_exception(cx: *mut JSContext, global: GlobalRef,
result: Error) {
assert!(unsafe { JS_IsExceptionPending(cx) } == 0);
- let exception = DOMException::new_from_error(*global, result).root();
+ let exception = DOMException::new_from_error(global, result).root();
let thrown = exception.to_jsval(cx);
unsafe {
JS_SetPendingException(cx, thrown);