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

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

Issue 419203004: DevTools: wrapping arguments addConsoleMessage in ConsoleMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@wrap-not-all-console-args
Patch Set: Created 6 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
OLDNEW
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
33 #include "core/events/Event.h" 33 #include "core/events/Event.h"
34 #include "core/fetch/FetchUtils.h" 34 #include "core/fetch/FetchUtils.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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 findCharsetInMediaType(mediaType, pos, len, start); 101 findCharsetInMediaType(mediaType, pos, len, start);
101 } 102 }
102 } 103 }
103 104
104 static void logConsoleError(ExecutionContext* context, const String& message) 105 static void logConsoleError(ExecutionContext* context, const String& message)
105 { 106 {
106 if (!context) 107 if (!context)
107 return; 108 return;
108 // FIXME: It's not good to report the bad usage without indicating what sour ce line it came from. 109 // FIXME: It's not good to report the bad usage without indicating what sour ce line it came from.
109 // We should pass additional parameters so we can tell the console where the mistake occurred. 110 // We should pass additional parameters so we can tell the console where the mistake occurred.
110 context->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message); 111 context->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMess ageLevel, message));
111 } 112 }
112 113
113 PassRefPtrWillBeRawPtr<XMLHttpRequest> XMLHttpRequest::create(ExecutionContext* context, PassRefPtr<SecurityOrigin> securityOrigin) 114 PassRefPtrWillBeRawPtr<XMLHttpRequest> XMLHttpRequest::create(ExecutionContext* context, PassRefPtr<SecurityOrigin> securityOrigin)
114 { 115 {
115 RefPtrWillBeRawPtr<XMLHttpRequest> xmlHttpRequest = adoptRefWillBeRefCounted GarbageCollected(new XMLHttpRequest(context, securityOrigin)); 116 RefPtrWillBeRawPtr<XMLHttpRequest> xmlHttpRequest = adoptRefWillBeRefCounted GarbageCollected(new XMLHttpRequest(context, securityOrigin));
116 xmlHttpRequest->suspendIfNeeded(); 117 xmlHttpRequest->suspendIfNeeded();
117 118
118 return xmlHttpRequest.release(); 119 return xmlHttpRequest.release();
119 } 120 }
120 121
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 { 1402 {
1402 visitor->trace(m_responseBlob); 1403 visitor->trace(m_responseBlob);
1403 visitor->trace(m_responseStream); 1404 visitor->trace(m_responseStream);
1404 visitor->trace(m_responseDocument); 1405 visitor->trace(m_responseDocument);
1405 visitor->trace(m_progressEventThrottle); 1406 visitor->trace(m_progressEventThrottle);
1406 visitor->trace(m_upload); 1407 visitor->trace(m_upload);
1407 XMLHttpRequestEventTarget::trace(visitor); 1408 XMLHttpRequestEventTarget::trace(visitor);
1408 } 1409 }
1409 1410
1410 } // namespace blink 1411 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerReportingProxy.h ('k') | Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698