Chromium Code Reviews| Index: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h |
| diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h |
| index 516d17d5c1a2bf5ff13ce1c27fc0414d913487aa..0ee3744aa0a4946ae24edae987df70454d47dd46 100644 |
| --- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h |
| +++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h |
| @@ -73,6 +73,12 @@ class XMLHttpRequest final : public XMLHttpRequestEventTarget, |
| DEFINE_WRAPPERTYPEINFO(); |
| USING_GARBAGE_COLLECTED_MIXIN(XMLHttpRequest); |
| + // In some cases hasPendingActivity doesn't work correctly, i.e., |
|
Yuki
2017/01/20 07:02:53
IMHO, hasPendingActivity is not designed to keep t
yhirano
2017/01/20 07:10:10
We have contextDestroyed and it makes hasPendingAc
|
| + // doesn't keep |this| alive. We need to cancel the loader in such cases, |
| + // which is why we need this pre-finalizer. |
| + // TODO(yhirano): Remove this pre-finalizer when the bug is fixed. |
| + USING_PRE_FINALIZER(XMLHttpRequest, dispose); |
|
sof
2017/01/20 09:17:23
This object is already eagerly finalized, so also
yhirano
2017/01/20 09:49:56
No. As written in the ThreadableLoader comments, a
yhirano
2017/01/20 09:54:08
What happens if we specify both?
1) Something ve
sof
2017/01/20 09:57:45
3, it is confused and wasteful to do both. The des
|
| + |
| public: |
| static XMLHttpRequest* create(ScriptState*); |
| static XMLHttpRequest* create(ExecutionContext*); |
| @@ -130,6 +136,7 @@ class XMLHttpRequest final : public XMLHttpRequestEventTarget, |
| const ArrayBufferOrArrayBufferViewOrBlobOrDocumentOrStringOrFormData&, |
| ExceptionState&); |
| void abort(); |
| + void dispose(); |
| void setRequestHeader(const AtomicString& name, |
| const AtomicString& value, |
| ExceptionState&); |