diff options
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r-- | components/script/dom/testbinding.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs index 95341751780..bbbbc8aa5d6 100644 --- a/components/script/dom/testbinding.rs +++ b/components/script/dom/testbinding.rs @@ -571,6 +571,15 @@ impl TestBindingMethods for TestBinding { fn FuncControlledAttributeEnabled(&self) -> bool { false } fn FuncControlledMethodDisabled(&self) {} fn FuncControlledMethodEnabled(&self) {} + + #[allow(unsafe_code)] + fn CrashHard(&self) { + static READ_ONLY_VALUE: i32 = 0; + unsafe { + let p: *mut u32 = &READ_ONLY_VALUE as *const _ as *mut _; + ptr::write_volatile(p, 0xbaadc0de); + } + } } impl TestBinding { |