diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-07-29 22:07:35 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-07-29 22:07:35 -0600 |
commit | 3a112bc07f49e5f1a79fe4788fe5e7676ccb8345 (patch) | |
tree | 10cc2c1f9c1ad4d0991254d2da90c65b32d64a96 /components/script/dom/bindings/utils.rs | |
parent | cc98026487514889ace9d7fbacd1542fc963a1aa (diff) | |
parent | b2cf27ba5d41f378da8a73607f2097e0b8688dbf (diff) | |
download | servo-3a112bc07f49e5f1a79fe4788fe5e7676ccb8345.tar.gz servo-3a112bc07f49e5f1a79fe4788fe5e7676ccb8345.zip |
Auto merge of #6834 - jdm:named-constructor-prototype, r=Ms2ger
Use an actual byte string when defining the prototype of named constr…
…uctors. Fixes #6730.
r? @Ms2ger
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6834)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/utils.rs')
-rw-r--r-- | components/script/dom/bindings/utils.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs index d29cc4d0c77..3a64b709ba3 100644 --- a/components/script/dom/bindings/utils.rs +++ b/components/script/dom/bindings/utils.rs @@ -233,7 +233,7 @@ pub fn do_create_interface_objects(cx: *mut JSContext, let constructor = RootedObject::new(cx, create_constructor(cx, cnative, cnargs, cs.as_ptr())); assert!(!constructor.ptr.is_null()); unsafe { - assert!(JS_DefineProperty1(cx, constructor.handle(), "prototype".as_ptr() as *const libc::c_char, + assert!(JS_DefineProperty1(cx, constructor.handle(), b"prototype\0".as_ptr() as *const libc::c_char, rval.handle(), JSPROP_PERMANENT | JSPROP_READONLY, None, None) != 0); |