OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> | 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> |
4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> | 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> |
5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. | 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. |
6 * Copyright (C) 2012 Intel Corporation | 6 * Copyright (C) 2012 Intel Corporation |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "core/events/Event.h" | 33 #include "core/events/Event.h" |
34 #include "core/fetch/CrossOriginAccessControl.h" | 34 #include "core/fetch/CrossOriginAccessControl.h" |
35 #include "core/fileapi/Blob.h" | 35 #include "core/fileapi/Blob.h" |
36 #include "core/fileapi/File.h" | 36 #include "core/fileapi/File.h" |
37 #include "core/frame/Settings.h" | 37 #include "core/frame/Settings.h" |
38 #include "core/frame/UseCounter.h" | 38 #include "core/frame/UseCounter.h" |
39 #include "core/frame/csp/ContentSecurityPolicy.h" | 39 #include "core/frame/csp/ContentSecurityPolicy.h" |
40 #include "core/html/DOMFormData.h" | 40 #include "core/html/DOMFormData.h" |
41 #include "core/html/HTMLDocument.h" | 41 #include "core/html/HTMLDocument.h" |
42 #include "core/html/parser/TextResourceDecoder.h" | 42 #include "core/html/parser/TextResourceDecoder.h" |
| 43 #include "core/inspector/ConsoleMessage.h" |
43 #include "core/inspector/InspectorInstrumentation.h" | 44 #include "core/inspector/InspectorInstrumentation.h" |
44 #include "core/inspector/InspectorTraceEvents.h" | 45 #include "core/inspector/InspectorTraceEvents.h" |
45 #include "core/loader/ThreadableLoader.h" | 46 #include "core/loader/ThreadableLoader.h" |
46 #include "core/streams/Stream.h" | 47 #include "core/streams/Stream.h" |
47 #include "core/xml/XMLHttpRequestProgressEvent.h" | 48 #include "core/xml/XMLHttpRequestProgressEvent.h" |
48 #include "core/xml/XMLHttpRequestUpload.h" | 49 #include "core/xml/XMLHttpRequestUpload.h" |
49 #include "platform/Logging.h" | 50 #include "platform/Logging.h" |
50 #include "platform/RuntimeEnabledFeatures.h" | 51 #include "platform/RuntimeEnabledFeatures.h" |
51 #include "platform/SharedBuffer.h" | 52 #include "platform/SharedBuffer.h" |
52 #include "platform/blob/BlobData.h" | 53 #include "platform/blob/BlobData.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 AtomicallyInitializedStatic(const XMLHttpRequestStaticData*, dummy = createX
MLHttpRequestStaticData()); | 152 AtomicallyInitializedStatic(const XMLHttpRequestStaticData*, dummy = createX
MLHttpRequestStaticData()); |
152 return dummy; | 153 return dummy; |
153 } | 154 } |
154 | 155 |
155 static void logConsoleError(ExecutionContext* context, const String& message) | 156 static void logConsoleError(ExecutionContext* context, const String& message) |
156 { | 157 { |
157 if (!context) | 158 if (!context) |
158 return; | 159 return; |
159 // FIXME: It's not good to report the bad usage without indicating what sour
ce line it came from. | 160 // FIXME: It's not good to report the bad usage without indicating what sour
ce line it came from. |
160 // We should pass additional parameters so we can tell the console where the
mistake occurred. | 161 // We should pass additional parameters so we can tell the console where the
mistake occurred. |
161 context->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message); | 162 context->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMess
ageLevel, message)); |
162 } | 163 } |
163 | 164 |
164 PassRefPtrWillBeRawPtr<XMLHttpRequest> XMLHttpRequest::create(ExecutionContext*
context, PassRefPtr<SecurityOrigin> securityOrigin) | 165 PassRefPtrWillBeRawPtr<XMLHttpRequest> XMLHttpRequest::create(ExecutionContext*
context, PassRefPtr<SecurityOrigin> securityOrigin) |
165 { | 166 { |
166 RefPtrWillBeRawPtr<XMLHttpRequest> xmlHttpRequest = adoptRefWillBeRefCounted
GarbageCollected(new XMLHttpRequest(context, securityOrigin)); | 167 RefPtrWillBeRawPtr<XMLHttpRequest> xmlHttpRequest = adoptRefWillBeRefCounted
GarbageCollected(new XMLHttpRequest(context, securityOrigin)); |
167 xmlHttpRequest->suspendIfNeeded(); | 168 xmlHttpRequest->suspendIfNeeded(); |
168 | 169 |
169 return xmlHttpRequest.release(); | 170 return xmlHttpRequest.release(); |
170 } | 171 } |
171 | 172 |
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1439 { | 1440 { |
1440 visitor->trace(m_responseBlob); | 1441 visitor->trace(m_responseBlob); |
1441 visitor->trace(m_responseStream); | 1442 visitor->trace(m_responseStream); |
1442 visitor->trace(m_responseDocument); | 1443 visitor->trace(m_responseDocument); |
1443 visitor->trace(m_progressEventThrottle); | 1444 visitor->trace(m_progressEventThrottle); |
1444 visitor->trace(m_upload); | 1445 visitor->trace(m_upload); |
1445 XMLHttpRequestEventTarget::trace(visitor); | 1446 XMLHttpRequestEventTarget::trace(visitor); |
1446 } | 1447 } |
1447 | 1448 |
1448 } // namespace blink | 1449 } // namespace blink |
OLD | NEW |