Bug 177772 crash [@JS_GetPrivate] serializing script with syntax error
r=brendan sr=ben git-svn-id: svn://10.0.0.236/trunk@133330 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
bab0976795
commit
4c2f725ef8
@ -5159,14 +5159,16 @@ nsXULPrototypeScript::Serialize(nsIObjectOutputStream* aStream,
|
||||
nsIScriptContext* aContext,
|
||||
nsISupportsArray* aNodeInfos)
|
||||
{
|
||||
NS_ASSERTION(!mSrcLoading || mSrcLoadWaiters != nsnull || !mJSObject,
|
||||
"script source still loading when serializing?!");
|
||||
if (!mJSObject)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsresult rv;
|
||||
|
||||
// Write basic prototype data
|
||||
aStream->Write16(mLineNo);
|
||||
|
||||
NS_ASSERTION(!mSrcLoading || mSrcLoadWaiters != nsnull || !mJSObject,
|
||||
"script source still loading when serializing?!");
|
||||
|
||||
JSContext* cx = NS_REINTERPRET_CAST(JSContext*,
|
||||
aContext->GetNativeContext());
|
||||
JSXDRState *xdr = ::JS_XDRNewMem(cx, JSXDR_ENCODE);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user