зеркало из https://github.com/mozilla/gecko-dev.git
Bug 177772 crash [@JS_GetPrivate] serializing script with syntax error
r=brendan sr=ben
This commit is contained in:
Родитель
9df7ab3cec
Коммит
5a93974314
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче