RESOLVED DUPLICATE of bug 120508 120886
Fix XMLHttpRequest leak document when send() is called multiple times
https://bugs.webkit.org/show_bug.cgi?id=120886
Summary Fix XMLHttpRequest leak document when send() is called multiple times
Ryosuke Niwa
Reported 2013-09-06 12:49:01 PDT
Consider merging https://chromium.googlesource.com/chromium/blink/+/b3786a870d66cf04539a8272e951643f10d4738f or delete the threaded parser. XMLHttpRequest creates a ThreadableLoader which may call XHR async, so it setPendingActivity() to avoid being destroyed. However, before this patch, unsetPendingActivity() was called asynchronously after ThreadableLoader was destroyed, so it lead to multiple problems: a) When next m_loader was set in send() with pending unsetPendingActivity(), the pendingActivity may be dropped even when there exists new m_loader need protection. b) pendingActivity may be set multiple times from pending unsetPendingActivity(), but dropProtectionSoon() only decrements m_pendingActivityCount by one, leading to a leak. This patch fix the above problems by unsetPendingActivity() synchronously with m_loader destruction where possible. XMLHttpRequest::stop() still uses asynchronous unsetPendingActivity() to workaround issues mentioned in r152266. The file "leak-check.js" was moved from fast/dom to fast/js to enable access from http tests.
Attachments
Alexey Proskuryakov
Comment 1 2013-09-06 12:54:32 PDT
*** This bug has been marked as a duplicate of bug 120508 ***
Note You need to log in before you can comment on or make changes to this bug.