зеркало из https://github.com/mozilla/pjs.git
Bug 721452, crash writing to startup cache when empty handler is used, r=bz
This commit is contained in:
Родитель
fbf7bc7400
Коммит
906be217c3
|
@ -1074,7 +1074,7 @@ nsXBLPrototypeHandler::Write(nsIScriptContext* aContext, nsIObjectOutputStream*
|
|||
{
|
||||
// Make sure we don't write out NS_HANDLER_TYPE_XUL types, as they are used
|
||||
// for <keyset> elements.
|
||||
if (mType & NS_HANDLER_TYPE_XUL)
|
||||
if ((mType & NS_HANDLER_TYPE_XUL) || !mEventName)
|
||||
return NS_OK;
|
||||
|
||||
XBLBindingSerializeDetails type = XBLBinding_Serialize_Handler;
|
||||
|
|
|
@ -79,6 +79,7 @@ _CHROME_FILES = \
|
|||
test_bug378518.xul \
|
||||
test_bug398135.xul \
|
||||
test_bug398492.xul \
|
||||
test_bug721452.xul \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<script>
|
||||
ok(true, "Handler with empty action didn't crash")
|
||||
</script>
|
||||
|
||||
<body xmlns="http://www.w3.org/1999/xhtml"/>
|
||||
|
||||
<box style="-moz-binding: url(#binding)"/>
|
||||
|
||||
<xbl:bindings xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
<xbl:binding id="binding">
|
||||
<xbl:content/>
|
||||
<xbl:handlers>
|
||||
<xbl:handler nt="action" action=""/>
|
||||
</xbl:handlers>
|
||||
</xbl:binding>
|
||||
</xbl:bindings>
|
||||
|
||||
</window>
|
Загрузка…
Ссылка в новой задаче