Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: Source/core/xml/XMLHttpRequest.h

Issue 23005006: Fix XMLHttpRequest leak document when send() is called multiple times. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: unsetPendingActivity before changeState() Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@nypop.com> 3 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@nypop.com>
4 * Copyright (C) 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2011 Google Inc. All rights reserved.
5 * Copyright (C) 2012 Intel Corporation 5 * Copyright (C) 2012 Intel Corporation
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public 8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 }; 67 };
68 68
69 enum ResponseTypeCode { 69 enum ResponseTypeCode {
70 ResponseTypeDefault, 70 ResponseTypeDefault,
71 ResponseTypeText, 71 ResponseTypeText,
72 ResponseTypeDocument, 72 ResponseTypeDocument,
73 ResponseTypeBlob, 73 ResponseTypeBlob,
74 ResponseTypeArrayBuffer 74 ResponseTypeArrayBuffer
75 }; 75 };
76 76
77 enum DropProtection {
78 DropProtectionSync,
79 DropProtectionAsync,
80 };
81
77 virtual void contextDestroyed(); 82 virtual void contextDestroyed();
78 virtual void didTimeout(); 83 virtual void didTimeout();
79 virtual bool canSuspend() const; 84 virtual bool canSuspend() const;
80 virtual void suspend(ReasonForSuspension); 85 virtual void suspend(ReasonForSuspension);
81 virtual void resume(); 86 virtual void resume();
82 virtual void stop(); 87 virtual void stop();
83 88
84 virtual const AtomicString& interfaceName() const; 89 virtual const AtomicString& interfaceName() const;
85 virtual ScriptExecutionContext* scriptExecutionContext() const; 90 virtual ScriptExecutionContext* scriptExecutionContext() const;
86 91
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 bool initSend(ExceptionState&); 174 bool initSend(ExceptionState&);
170 void sendBytesData(const void*, size_t, ExceptionState&); 175 void sendBytesData(const void*, size_t, ExceptionState&);
171 176
172 String getRequestHeader(const AtomicString& name) const; 177 String getRequestHeader(const AtomicString& name) const;
173 void setRequestHeaderInternal(const AtomicString& name, const String& value) ; 178 void setRequestHeaderInternal(const AtomicString& name, const String& value) ;
174 179
175 void changeState(State newState); 180 void changeState(State newState);
176 void callReadyStateChangeListener(); 181 void callReadyStateChangeListener();
177 void dropProtectionSoon(); 182 void dropProtectionSoon();
178 void dropProtection(Timer<XMLHttpRequest>* = 0); 183 void dropProtection(Timer<XMLHttpRequest>* = 0);
179 void internalAbort(); 184 void internalAbort(DropProtection = DropProtectionSync);
180 void clearResponse(); 185 void clearResponse();
181 void clearResponseBuffers(); 186 void clearResponseBuffers();
182 void clearRequest(); 187 void clearRequest();
183 188
184 void createRequest(ExceptionState&); 189 void createRequest(ExceptionState&);
185 190
186 void genericError(); 191 void genericError();
187 void networkError(); 192 void networkError();
188 void abortError(); 193 void abortError();
189 194
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 240
236 // An enum corresponding to the allowed string values for the responseType a ttribute. 241 // An enum corresponding to the allowed string values for the responseType a ttribute.
237 ResponseTypeCode m_responseTypeCode; 242 ResponseTypeCode m_responseTypeCode;
238 Timer<XMLHttpRequest> m_protectionTimer; 243 Timer<XMLHttpRequest> m_protectionTimer;
239 RefPtr<SecurityOrigin> m_securityOrigin; 244 RefPtr<SecurityOrigin> m_securityOrigin;
240 }; 245 };
241 246
242 } // namespace WebCore 247 } // namespace WebCore
243 248
244 #endif // XMLHttpRequest_h 249 #endif // XMLHttpRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698