mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 784190 - Fix Cycle collection casting in DOMRequest, r=mccr8
This commit is contained in:
parent
991a3567bb
commit
34c7f9dc7b
@ -179,7 +179,10 @@ void
|
|||||||
DOMRequest::RootResultVal()
|
DOMRequest::RootResultVal()
|
||||||
{
|
{
|
||||||
NS_ASSERTION(!mRooted, "Don't call me if already rooted!");
|
NS_ASSERTION(!mRooted, "Don't call me if already rooted!");
|
||||||
NS_HOLD_JS_OBJECTS(this, DOMRequest);
|
nsXPCOMCycleCollectionParticipant *participant;
|
||||||
|
CallQueryInterface(this, &participant);
|
||||||
|
nsContentUtils::HoldJSObjects(NS_CYCLE_COLLECTION_UPCAST(this, DOMRequest),
|
||||||
|
participant);
|
||||||
mRooted = true;
|
mRooted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void FireEvent(const nsAString& aType, bool aBubble, bool aCancelable);
|
void FireEvent(const nsAString& aType, bool aBubble, bool aCancelable);
|
||||||
|
|
||||||
virtual void RootResultVal();
|
void RootResultVal();
|
||||||
virtual void UnrootResultVal();
|
void UnrootResultVal();
|
||||||
|
|
||||||
void Init(nsIDOMWindow* aWindow);
|
void Init(nsIDOMWindow* aWindow);
|
||||||
};
|
};
|
||||||
|
@ -160,14 +160,3 @@ FileRequest::FireProgressEvent(uint64_t aLoaded, uint64_t aTotal)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
FileRequest::RootResultVal()
|
|
||||||
{
|
|
||||||
NS_ASSERTION(!mRooted, "Don't call me if already rooted!");
|
|
||||||
nsXPCOMCycleCollectionParticipant *participant;
|
|
||||||
CallQueryInterface(this, &participant);
|
|
||||||
nsContentUtils::HoldJSObjects(NS_CYCLE_COLLECTION_UPCAST(this, DOMRequest),
|
|
||||||
participant);
|
|
||||||
mRooted = true;
|
|
||||||
}
|
|
||||||
|
@ -51,9 +51,6 @@ private:
|
|||||||
void
|
void
|
||||||
FireProgressEvent(uint64_t aLoaded, uint64_t aTotal);
|
FireProgressEvent(uint64_t aLoaded, uint64_t aTotal);
|
||||||
|
|
||||||
virtual void
|
|
||||||
RootResultVal();
|
|
||||||
|
|
||||||
nsRefPtr<LockedFile> mLockedFile;
|
nsRefPtr<LockedFile> mLockedFile;
|
||||||
bool mIsFileRequest;
|
bool mIsFileRequest;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user