mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1041148 - Move HoldJSObjects call to XMLHttpRequest constructor to simplify the code. r=bz
This commit is contained in:
parent
d1a4aaddf4
commit
82972d112d
@ -1577,6 +1577,8 @@ XMLHttpRequest::XMLHttpRequest(WorkerPrivate* aWorkerPrivate)
|
|||||||
mWorkerPrivate->AssertIsOnWorkerThread();
|
mWorkerPrivate->AssertIsOnWorkerThread();
|
||||||
|
|
||||||
SetIsDOMBinding();
|
SetIsDOMBinding();
|
||||||
|
|
||||||
|
mozilla::HoldJSObjects(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
XMLHttpRequest::~XMLHttpRequest()
|
XMLHttpRequest::~XMLHttpRequest()
|
||||||
@ -2365,7 +2367,4 @@ XMLHttpRequest::UpdateState(const StateData& aStateData,
|
|||||||
else {
|
else {
|
||||||
mStateData = aStateData;
|
mStateData = aStateData;
|
||||||
}
|
}
|
||||||
if (mStateData.mResponse.isGCThing()) {
|
|
||||||
mozilla::HoldJSObjects(this);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user