Auto merge of #11465 - nox:open, r=jdm

Implement window.openURLInDefaultBrowser() (fixes #11292)

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11465)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-05-27 12:03:56 -05:00
commit 3052e4f478
9 changed files with 40 additions and 14 deletions

View file

@ -2390,6 +2390,7 @@ Root::from_ref(&*raw)""" % {'copyUnforgeable': unforgeable, 'createObject': crea
create = CreateBindingJSObject(self.descriptor)
return CGGeneric("""\
%(createObject)s
(*raw).init_reflector(obj.ptr);
let _ac = JSAutoCompartment::new(cx, obj.ptr);
let mut proto = RootedObject::new(cx, ptr::null_mut());
@ -2397,7 +2398,6 @@ GetProtoObject(cx, obj.handle(), proto.handle_mut());
JS_SetPrototype(cx, obj.handle(), proto.handle());
%(copyUnforgeable)s
(*raw).init_reflector(obj.ptr);
Root::from_ref(&*raw)\
""" % {'copyUnforgeable': unforgeable, 'createObject': create})