Bug 736752 - Compartment mismatch in JetPack 'test-content-proxy.testTypedArrays', r=bholley

This commit is contained in:
Ms2ger 2012-03-20 13:57:00 -07:00
parent e9aa7bcb5e
commit 18b67b5a12
3 changed files with 4 additions and 8 deletions

View File

@ -57,10 +57,10 @@ ImageData::GetHeight(PRUint32* aHeight)
/* readonly attribute jsval data; */
NS_IMETHODIMP
ImageData::GetData(JS::Value* aData)
ImageData::GetData(JSContext* aCx, JS::Value* aData)
{
*aData = GetData();
return NS_OK;
*aData = JS::ObjectOrNullValue(GetDataObject());
return JS_WrapValue(aCx, aData) ? NS_OK : NS_ERROR_FAILURE;
}
void

View File

@ -51,10 +51,6 @@ public:
{
return mHeight;
}
JS::Value GetData()
{
return JS::ObjectOrNullValue(GetDataObject());
}
JSObject* GetDataObject()
{
xpc_UnmarkGrayObject(mData);

View File

@ -67,7 +67,7 @@ interface nsIDOMImageData : nsISupports
{
readonly attribute unsigned long width;
readonly attribute unsigned long height;
readonly attribute jsval data;
[implicit_jscontext] readonly attribute jsval data;
};
[scriptable, uuid(c835c768-2dcc-461c-82f5-3653710d2942)]