зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #6834 - Use an actual byte string when defining the prototype of named constr… (from jdm:named-constructor-prototype); r=Ms2ger
…uctors. Fixes #6730. r? @Ms2ger Source-Repo: https://github.com/servo/servo Source-Revision: 3a112bc07f49e5f1a79fe4788fe5e7676ccb8345
This commit is contained in:
Родитель
f324432072
Коммит
d73aab0b4c
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче