mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
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 -->
This commit is contained in:
commit
3a112bc07f
2 changed files with 1 additions and 7 deletions
|
@ -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()));
|
let constructor = RootedObject::new(cx, create_constructor(cx, cnative, cnargs, cs.as_ptr()));
|
||||||
assert!(!constructor.ptr.is_null());
|
assert!(!constructor.ptr.is_null());
|
||||||
unsafe {
|
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(),
|
rval.handle(),
|
||||||
JSPROP_PERMANENT | JSPROP_READONLY,
|
JSPROP_PERMANENT | JSPROP_READONLY,
|
||||||
None, None) != 0);
|
None, None) != 0);
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
[Image-constructor.html]
|
|
||||||
type: testharness
|
|
||||||
[Image and HTMLImageElement share a prototype]
|
|
||||||
expected:
|
|
||||||
if not debug: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue