Bug 1033343: Handle an uninitialized CustomEvent correctly. r=smaug

This commit is contained in:
Kyle Huey 2014-07-03 15:19:03 -07:00
parent 9bf3f6fd96
commit dc7958f63c
3 changed files with 11 additions and 0 deletions

View File

@ -101,6 +101,11 @@ void
CustomEvent::GetDetail(JSContext* aCx,
JS::MutableHandle<JS::Value> aRetval)
{
if (!mDetail) {
aRetval.setNull();
return;
}
VariantToJsval(aCx, mDetail, aRetval);
}

View File

@ -0,0 +1,5 @@
<script>
document.createEvent('CustomEvent').detail;
</script>

View File

@ -5,6 +5,7 @@ load 422009-1.xhtml
load 457776-1.html
load 496308-1.html
load 682637-1.html
load 1033343.html
load eventctor-nulldictionary.html
load eventctor-nullstorage.html
load recursive-onload.html