Skip to content

Commit 508da78

Browse files
committed
Bug 994335 - Null-check aProtoDoc in nsXULPrototypeScript::Serialize. r=smaug, a=sledru
1 parent 263ea47 commit 508da78

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

content/xul/content/src/nsXULElement.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2392,6 +2392,7 @@ nsXULPrototypeScript::Serialize(nsIObjectOutputStream* aStream,
23922392
nsXULPrototypeDocument* aProtoDoc,
23932393
const nsCOMArray<nsINodeInfo> *aNodeInfos)
23942394
{
2395+
NS_ENSURE_TRUE(aProtoDoc, NS_ERROR_UNEXPECTED);
23952396
AutoSafeJSContext cx;
23962397
JS::Rooted<JSObject*> global(cx, aProtoDoc->GetCompilationGlobal());
23972398
NS_ENSURE_TRUE(global, NS_ERROR_UNEXPECTED);

0 commit comments

Comments
 (0)