Skip to content

Commit

Permalink
Bug 1041148 - Move HoldJSObjects call to XMLHttpRequest constructor t…
Browse files Browse the repository at this point in the history
…o simplify the code. r=bz
  • Loading branch information
jandem committed Aug 6, 2014
1 parent d1a4aad commit 82972d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dom/workers/XMLHttpRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1577,6 +1577,8 @@ XMLHttpRequest::XMLHttpRequest(WorkerPrivate* aWorkerPrivate)
mWorkerPrivate->AssertIsOnWorkerThread();

SetIsDOMBinding();

mozilla::HoldJSObjects(this);
}

XMLHttpRequest::~XMLHttpRequest()
Expand Down Expand Up @@ -2365,7 +2367,4 @@ XMLHttpRequest::UpdateState(const StateData& aStateData,
else {
mStateData = aStateData;
}
if (mStateData.mResponse.isGCThing()) {
mozilla::HoldJSObjects(this);
}
}

0 comments on commit 82972d1

Please sign in to comment.