aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2015-07-29 12:39:26 -0400
committerJosh Matthews <josh@joshmatthews.net>2015-07-29 12:39:26 -0400
commitb2cf27ba5d41f378da8a73607f2097e0b8688dbf (patch)
tree61c261284a9caaa4b08a6021b88955f94e136cee
parente0bd80f80715bdbdf30de1de9c79a99a41cfd99e (diff)
downloadservo-b2cf27ba5d41f378da8a73607f2097e0b8688dbf.tar.gz
servo-b2cf27ba5d41f378da8a73607f2097e0b8688dbf.zip
Use an actual byte string when defining the prototype of named constructors. Fixes #6730.
-rw-r--r--components/script/dom/bindings/utils.rs2
-rw-r--r--tests/wpt/metadata/html/semantics/embedded-content/the-img-element/Image-constructor.html.ini6
2 files changed, 1 insertions, 7 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);
diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/Image-constructor.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/Image-constructor.html.ini
deleted file mode 100644
index cf1b2d37e49..00000000000
--- a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/Image-constructor.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[Image-constructor.html]
- type: testharness
- [Image and HTMLImageElement share a prototype]
- expected:
- if not debug: FAIL
-