mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 721452, crash writing to startup cache when empty handler is used, r=bz
This commit is contained in:
parent
0740a53911
commit
ba93add056
@ -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)
|
||||
|
25
content/xbl/test/test_bug721452.xul
Normal file
25
content/xbl/test/test_bug721452.xul
Normal file
@ -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>
|
Loading…
Reference in New Issue
Block a user