diff --git a/content/xbl/src/nsXBLProtoImplMethod.cpp b/content/xbl/src/nsXBLProtoImplMethod.cpp index 692b5f8e15b..b76cd3bd2dd 100644 --- a/content/xbl/src/nsXBLProtoImplMethod.cpp +++ b/content/xbl/src/nsXBLProtoImplMethod.cpp @@ -273,9 +273,7 @@ nsXBLProtoImplMethod::Read(nsIScriptContext* aContext, nsIObjectInputStream* aStream) { void* methodCode; - PRUint32 lineNumber; - nsresult rv = XBL_DeserializeFunction(aContext, aStream, this, - &lineNumber, &methodCode); + nsresult rv = XBL_DeserializeFunction(aContext, aStream, this, &methodCode); mJSMethodObject = (JSObject *)methodCode; if (NS_FAILED(rv)) { SetUncompiledMethod(nsnull); @@ -299,8 +297,7 @@ nsXBLProtoImplMethod::Write(nsIScriptContext* aContext, rv = aStream->WriteWStringZ(mName); NS_ENSURE_SUCCESS(rv, rv); - // XXXndeakin fix line number - return XBL_SerializeFunction(aContext, aStream, mJSMethodObject, 0); + return XBL_SerializeFunction(aContext, aStream, mJSMethodObject); } nsresult @@ -394,8 +391,7 @@ nsXBLProtoImplAnonymousMethod::Write(nsIScriptContext* aContext, nsresult rv = aStream->Write8(aType); NS_ENSURE_SUCCESS(rv, rv); - // XXXndeakin write out line number - rv = XBL_SerializeFunction(aContext, aStream, mJSMethodObject, 0); + rv = XBL_SerializeFunction(aContext, aStream, mJSMethodObject); NS_ENSURE_SUCCESS(rv, rv); } diff --git a/content/xbl/src/nsXBLProtoImplProperty.cpp b/content/xbl/src/nsXBLProtoImplProperty.cpp index 95d3518f8cf..2cea12ef94e 100644 --- a/content/xbl/src/nsXBLProtoImplProperty.cpp +++ b/content/xbl/src/nsXBLProtoImplProperty.cpp @@ -361,12 +361,11 @@ nsXBLProtoImplProperty::Read(nsIScriptContext* aContext, XBLBindingSerializeDetails aType) { nsresult rv; - PRUint32 lineNumber; void* scriptObject; if (aType == XBLBinding_Serialize_GetterProperty || aType == XBLBinding_Serialize_GetterSetterProperty) { - rv = XBL_DeserializeFunction(aContext, aStream, this, &lineNumber, &scriptObject); + rv = XBL_DeserializeFunction(aContext, aStream, this, &scriptObject); NS_ENSURE_SUCCESS(rv, rv); mJSGetterObject = (JSObject *)scriptObject; @@ -375,7 +374,7 @@ nsXBLProtoImplProperty::Read(nsIScriptContext* aContext, if (aType == XBLBinding_Serialize_SetterProperty || aType == XBLBinding_Serialize_GetterSetterProperty) { - rv = XBL_DeserializeFunction(aContext, aStream, this, &lineNumber, &scriptObject); + rv = XBL_DeserializeFunction(aContext, aStream, this, &scriptObject); NS_ENSURE_SUCCESS(rv, rv); mJSSetterObject = (JSObject *)scriptObject; @@ -414,14 +413,12 @@ nsXBLProtoImplProperty::Write(nsIScriptContext* aContext, NS_ENSURE_SUCCESS(rv, rv); if (mJSAttributes & JSPROP_GETTER) { - // XXXndeakin write out line number - rv = XBL_SerializeFunction(aContext, aStream, mJSGetterObject, 0); + rv = XBL_SerializeFunction(aContext, aStream, mJSGetterObject); NS_ENSURE_SUCCESS(rv, rv); } if (mJSAttributes & JSPROP_SETTER) { - // XXXndeakin write out line number - rv = XBL_SerializeFunction(aContext, aStream, mJSSetterObject, 0); + rv = XBL_SerializeFunction(aContext, aStream, mJSSetterObject); NS_ENSURE_SUCCESS(rv, rv); } diff --git a/content/xbl/src/nsXBLSerialize.cpp b/content/xbl/src/nsXBLSerialize.cpp index 7348e9ccc2d..bba6a7091b6 100644 --- a/content/xbl/src/nsXBLSerialize.cpp +++ b/content/xbl/src/nsXBLSerialize.cpp @@ -43,11 +43,9 @@ nsresult XBL_SerializeFunction(nsIScriptContext* aContext, nsIObjectOutputStream* aStream, - JSObject* aFunctionObject, - PRUint32 aLineNumber) + JSObject* aFunctionObject) { - nsresult rv = aStream->Write32(aLineNumber); - NS_ENSURE_SUCCESS(rv, rv); + nsresult rv; JSContext* cx = (JSContext*) aContext->GetNativeContext(); JSXDRState *xdr = ::JS_XDRNewMem(cx, JSXDR_ENCODE); @@ -81,19 +79,14 @@ nsresult XBL_DeserializeFunction(nsIScriptContext* aContext, nsIObjectInputStream* aStream, void* aHolder, - PRUint32* aLineNumber, void **aScriptObject) { *aScriptObject = nsnull; - nsresult rv = aStream->Read32(aLineNumber); - if (NS_FAILED(rv)) - return rv; - JSObject* functionObject = nsnull; PRUint32 size; - rv = aStream->Read32(&size); + nsresult rv = aStream->Read32(&size); if (NS_FAILED(rv)) return rv; diff --git a/content/xbl/src/nsXBLSerialize.h b/content/xbl/src/nsXBLSerialize.h index 53805b6c2c1..ca4f7b11afa 100644 --- a/content/xbl/src/nsXBLSerialize.h +++ b/content/xbl/src/nsXBLSerialize.h @@ -108,14 +108,12 @@ PR_STATIC_ASSERT(XBLBinding_Serialize_CustomNamespace >= kNameSpaceID_LastBuilti nsresult XBL_SerializeFunction(nsIScriptContext* aContext, nsIObjectOutputStream* aStream, - JSObject* aFunctionObject, - PRUint32 aLineNumber); + JSObject* aFunctionObject); nsresult XBL_DeserializeFunction(nsIScriptContext* aContext, nsIObjectInputStream* aStream, void* aHolder, - PRUint32* aLineNumber, void **aScriptObject); #endif // nsXBLSerialize_h__