mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Use an actual byte string when defining the prototype of named constructors. Fixes #6730.
This commit is contained in:
parent
e0bd80f807
commit
b2cf27ba5d
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()));
|
||||
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);
|
||||
|
|
|
@ -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