Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (223819 => 223820)
--- trunk/Source/_javascript_Core/ChangeLog 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/_javascript_Core/ChangeLog 2017-10-21 22:23:00 UTC (rev 223820)
@@ -1,3 +1,22 @@
+2017-10-21 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Remove unused Console.setMonitoringXHREnabled
+ https://bugs.webkit.org/show_bug.cgi?id=178617
+
+ Reviewed by Sam Weinig.
+
+ * _javascript_Core.xcodeproj/project.pbxproj:
+ * Sources.txt:
+ * inspector/agents/InspectorConsoleAgent.h:
+ * inspector/agents/JSGlobalObjectConsoleAgent.cpp: Removed.
+ * inspector/agents/JSGlobalObjectConsoleAgent.h: Removed.
+ * inspector/protocol/Console.json:
+ Removed files and method.
+
+ * inspector/JSGlobalObjectInspectorController.cpp:
+ (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
+ This can use the base ConsoleAgent now.
+
2017-10-21 Yusuke Suzuki <[email protected]>
[JSC] Remove per-host-function CTI stub in 32bit environment
Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (223819 => 223820)
--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2017-10-21 22:23:00 UTC (rev 223820)
@@ -1335,7 +1335,6 @@
A5FD007A189B051000633231 /* ConsoleMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = A5FD0078189B051000633231 /* ConsoleMessage.h */; settings = {ATTRIBUTES = (Private, ); }; };
A5FD007E189B0B4C00633231 /* ScriptCallStackFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = A5FD007C189B0B4C00633231 /* ScriptCallStackFactory.h */; settings = {ATTRIBUTES = (Private, ); }; };
A5FD0082189B191A00633231 /* InspectorConsoleAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = A5FD0080189B191A00633231 /* InspectorConsoleAgent.h */; settings = {ATTRIBUTES = (Private, ); }; };
- A5FD0086189B1B7E00633231 /* JSGlobalObjectConsoleAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = A5FD0084189B1B7E00633231 /* JSGlobalObjectConsoleAgent.h */; };
A700873A17CBE85300C3E643 /* MapConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = A700873817CBE85300C3E643 /* MapConstructor.h */; };
A700873E17CBE8D300C3E643 /* MapPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = A700873C17CBE8D300C3E643 /* MapPrototype.h */; };
A700874217CBE8EB00C3E643 /* JSMap.h in Headers */ = {isa = PBXBuildFile; fileRef = A700874017CBE8EB00C3E643 /* JSMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -3957,8 +3956,6 @@
A5FD007C189B0B4C00633231 /* ScriptCallStackFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptCallStackFactory.h; sourceTree = "<group>"; };
A5FD007F189B191A00633231 /* InspectorConsoleAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorConsoleAgent.cpp; sourceTree = "<group>"; };
A5FD0080189B191A00633231 /* InspectorConsoleAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorConsoleAgent.h; sourceTree = "<group>"; };
- A5FD0083189B1B7E00633231 /* JSGlobalObjectConsoleAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectConsoleAgent.cpp; sourceTree = "<group>"; };
- A5FD0084189B1B7E00633231 /* JSGlobalObjectConsoleAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObjectConsoleAgent.h; sourceTree = "<group>"; };
A700873717CBE85300C3E643 /* MapConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MapConstructor.cpp; sourceTree = "<group>"; };
A700873817CBE85300C3E643 /* MapConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapConstructor.h; sourceTree = "<group>"; };
A700873B17CBE8D300C3E643 /* MapPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MapPrototype.cpp; sourceTree = "<group>"; };
@@ -7560,8 +7557,6 @@
A50E4B5E18809DD50068A46D /* InspectorRuntimeAgent.h */,
A55165D01BDEFDBD003B75C1 /* InspectorScriptProfilerAgent.cpp */,
A55165D11BDEFDBD003B75C1 /* InspectorScriptProfilerAgent.h */,
- A5FD0083189B1B7E00633231 /* JSGlobalObjectConsoleAgent.cpp */,
- A5FD0084189B1B7E00633231 /* JSGlobalObjectConsoleAgent.h */,
A57D23E71891B0770031C7FA /* JSGlobalObjectDebuggerAgent.cpp */,
A57D23E81891B0770031C7FA /* JSGlobalObjectDebuggerAgent.h */,
A50E4B5F18809DD50068A46D /* JSGlobalObjectRuntimeAgent.cpp */,
@@ -8764,7 +8759,6 @@
797E07AA1B8FCFB9008400BA /* JSGlobalLexicalEnvironment.h in Headers */,
BC18C4210E16F5CD00B34460 /* JSGlobalObject.h in Headers */,
996B731D1BDA08EF00331B84 /* JSGlobalObject.lut.h in Headers */,
- A5FD0086189B1B7E00633231 /* JSGlobalObjectConsoleAgent.h in Headers */,
A5C3A1A618C0490200C9593A /* JSGlobalObjectConsoleClient.h in Headers */,
A59455931824744700CC3843 /* JSGlobalObjectDebuggable.h in Headers */,
A57D23EA1891B0770031C7FA /* JSGlobalObjectDebuggerAgent.h in Headers */,
Modified: trunk/Source/_javascript_Core/Sources.txt (223819 => 223820)
--- trunk/Source/_javascript_Core/Sources.txt 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/_javascript_Core/Sources.txt 2017-10-21 22:23:00 UTC (rev 223820)
@@ -557,7 +557,6 @@
inspector/agents/InspectorHeapAgent.cpp
inspector/agents/InspectorRuntimeAgent.cpp
inspector/agents/InspectorScriptProfilerAgent.cpp
-inspector/agents/JSGlobalObjectConsoleAgent.cpp
inspector/agents/JSGlobalObjectDebuggerAgent.cpp
inspector/agents/JSGlobalObjectRuntimeAgent.cpp
Modified: trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.cpp (223819 => 223820)
--- trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.cpp 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/_javascript_Core/inspector/JSGlobalObjectInspectorController.cpp 2017-10-21 22:23:00 UTC (rev 223820)
@@ -35,6 +35,7 @@
#include "InjectedScriptManager.h"
#include "InspectorAgent.h"
#include "InspectorBackendDispatcher.h"
+#include "InspectorConsoleAgent.h"
#include "InspectorFrontendChannel.h"
#include "InspectorFrontendRouter.h"
#include "InspectorHeapAgent.h"
@@ -41,7 +42,6 @@
#include "InspectorScriptProfilerAgent.h"
#include "JSCInlines.h"
#include "JSGlobalObject.h"
-#include "JSGlobalObjectConsoleAgent.h"
#include "JSGlobalObjectConsoleClient.h"
#include "JSGlobalObjectDebuggerAgent.h"
#include "JSGlobalObjectRuntimeAgent.h"
@@ -83,7 +83,7 @@
auto inspectorAgent = std::make_unique<InspectorAgent>(context);
auto runtimeAgent = std::make_unique<JSGlobalObjectRuntimeAgent>(context);
auto heapAgent = std::make_unique<InspectorHeapAgent>(context);
- auto consoleAgent = std::make_unique<JSGlobalObjectConsoleAgent>(context, heapAgent.get());
+ auto consoleAgent = std::make_unique<InspectorConsoleAgent>(context, heapAgent.get());
auto debuggerAgent = std::make_unique<JSGlobalObjectDebuggerAgent>(context, consoleAgent.get());
auto scriptProfilerAgent = std::make_unique<InspectorScriptProfilerAgent>(context);
Modified: trunk/Source/_javascript_Core/inspector/agents/InspectorConsoleAgent.h (223819 => 223820)
--- trunk/Source/_javascript_Core/inspector/agents/InspectorConsoleAgent.h 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/_javascript_Core/inspector/agents/InspectorConsoleAgent.h 2017-10-21 22:23:00 UTC (rev 223820)
@@ -61,7 +61,6 @@
void enable(ErrorString&) override;
void disable(ErrorString&) override;
void clearMessages(ErrorString&) override;
- void setMonitoringXHREnabled(ErrorString&, bool enabled) override = 0;
bool enabled() const { return m_enabled; }
void reset();
Deleted: trunk/Source/_javascript_Core/inspector/agents/JSGlobalObjectConsoleAgent.cpp (223819 => 223820)
--- trunk/Source/_javascript_Core/inspector/agents/JSGlobalObjectConsoleAgent.cpp 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/_javascript_Core/inspector/agents/JSGlobalObjectConsoleAgent.cpp 2017-10-21 22:23:00 UTC (rev 223820)
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "JSGlobalObjectConsoleAgent.h"
-
-namespace Inspector {
-
-JSGlobalObjectConsoleAgent::JSGlobalObjectConsoleAgent(AgentContext& context, InspectorHeapAgent* heapAgent)
- : InspectorConsoleAgent(context, heapAgent)
-{
-}
-
-void JSGlobalObjectConsoleAgent::setMonitoringXHREnabled(ErrorString& errorString, bool)
-{
- errorString = ASCIILiteral("Not supported for _javascript_ context");
-}
-
-} // namespace Inspector
Deleted: trunk/Source/_javascript_Core/inspector/agents/JSGlobalObjectConsoleAgent.h (223819 => 223820)
--- trunk/Source/_javascript_Core/inspector/agents/JSGlobalObjectConsoleAgent.h 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/_javascript_Core/inspector/agents/JSGlobalObjectConsoleAgent.h 2017-10-21 22:23:00 UTC (rev 223820)
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include "InspectorConsoleAgent.h"
-
-namespace Inspector {
-
-class JSGlobalObjectConsoleAgent final : public InspectorConsoleAgent {
- WTF_MAKE_NONCOPYABLE(JSGlobalObjectConsoleAgent);
- WTF_MAKE_FAST_ALLOCATED;
-public:
- JSGlobalObjectConsoleAgent(AgentContext&, InspectorHeapAgent*);
- virtual ~JSGlobalObjectConsoleAgent() { }
-
- // FIXME: XHRs and Nodes only makes sense debugging a Web context. Can this be moved to a different agent?
- void setMonitoringXHREnabled(ErrorString&, bool enabled) override;
-};
-
-} // namespace Inspector
Modified: trunk/Source/_javascript_Core/inspector/protocol/Console.json (223819 => 223820)
--- trunk/Source/_javascript_Core/inspector/protocol/Console.json 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/_javascript_Core/inspector/protocol/Console.json 2017-10-21 22:23:00 UTC (rev 223820)
@@ -57,13 +57,6 @@
{
"name": "clearMessages",
"description": "Clears console messages collected in the browser."
- },
- {
- "name": "setMonitoringXHREnabled",
- "description": "Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued.",
- "parameters": [
- { "name": "enabled", "type": "boolean", "description": "Monitoring enabled state." }
- ]
}
],
"events": [
Modified: trunk/Source/WebCore/ChangeLog (223819 => 223820)
--- trunk/Source/WebCore/ChangeLog 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/WebCore/ChangeLog 2017-10-21 22:23:00 UTC (rev 223820)
@@ -1,3 +1,28 @@
+2017-10-21 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Remove unused Console.setMonitoringXHREnabled
+ https://bugs.webkit.org/show_bug.cgi?id=178617
+
+ Reviewed by Sam Weinig.
+
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
+ * inspector/InspectorInstrumentation.h:
+ (WebCore::InspectorInstrumentation::didFinishXHRLoading):
+ * inspector/WebConsoleAgent.cpp:
+ (WebCore::WebConsoleAgent::setMonitoringXHREnabled): Deleted.
+ (WebCore::WebConsoleAgent::didFinishXHRLoading): Deleted.
+ * inspector/WebConsoleAgent.h:
+ Remove XHR monitoring code.
+
+ * xml/XMLHttpRequest.h:
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::send):
+ (WebCore::XMLHttpRequest::didFinishLoading):
+ (WebCore::XMLHttpRequest::setLastSendLineAndColumnNumber): Deleted.
+ * xml/XMLHttpRequest.idl:
+ Remove now unused state on XHR and ExecState requirement for send().
+
2017-10-21 Dean Jackson <[email protected]>
createImageBitmap with basic HTMLImageElement
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (223819 => 223820)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2017-10-21 22:23:00 UTC (rev 223820)
@@ -625,10 +625,8 @@
consoleAgent->didFailLoading(identifier, error); // This should come AFTER resource notification, front-end relies on this.
}
-void InspectorInstrumentation::didFinishXHRLoadingImpl(InstrumentingAgents& instrumentingAgents, unsigned long identifier, std::optional<String> decodedText, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber)
+void InspectorInstrumentation::didFinishXHRLoadingImpl(InstrumentingAgents& instrumentingAgents, unsigned long identifier, std::optional<String> decodedText)
{
- if (WebConsoleAgent* consoleAgent = instrumentingAgents.webConsoleAgent())
- consoleAgent->didFinishXHRLoading(identifier, url, sendURL, sendLineNumber, sendColumnNumber);
if (InspectorNetworkAgent* networkAgent = instrumentingAgents.inspectorNetworkAgent()) {
if (decodedText)
networkAgent->didFinishXHRLoading(identifier, *decodedText);
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (223819 => 223820)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2017-10-21 22:23:00 UTC (rev 223820)
@@ -186,7 +186,7 @@
enum class LoadType { Ping, Beacon };
static void willSendRequestOfType(Frame*, unsigned long identifier, DocumentLoader*, ResourceRequest&, LoadType);
- static void didFinishXHRLoading(ScriptExecutionContext*, unsigned long identifier, std::optional<String> decodedText, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber);
+ static void didFinishXHRLoading(ScriptExecutionContext*, unsigned long identifier, std::optional<String> decodedText);
static void willLoadXHRSynchronously(ScriptExecutionContext*);
static void didLoadXHRSynchronously(ScriptExecutionContext*);
static void scriptImported(ScriptExecutionContext&, unsigned long identifier, const String& sourceString);
@@ -355,7 +355,7 @@
static void didReceiveDataImpl(InstrumentingAgents&, unsigned long identifier, const char* data, int dataLength, int encodedDataLength);
static void didFinishLoadingImpl(InstrumentingAgents&, unsigned long identifier, DocumentLoader*, const NetworkLoadMetrics&, ResourceLoader*);
static void didFailLoadingImpl(InstrumentingAgents&, unsigned long identifier, DocumentLoader*, const ResourceError&);
- static void didFinishXHRLoadingImpl(InstrumentingAgents&, unsigned long identifier, std::optional<String> decodedText, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber);
+ static void didFinishXHRLoadingImpl(InstrumentingAgents&, unsigned long identifier, std::optional<String> decodedText);
static void willLoadXHRSynchronouslyImpl(InstrumentingAgents&);
static void didLoadXHRSynchronouslyImpl(InstrumentingAgents&);
static void scriptImportedImpl(InstrumentingAgents&, unsigned long identifier, const String& sourceString);
@@ -957,10 +957,10 @@
didReceiveResourceResponseImpl(*instrumentingAgents, identifier, &loader, response, nullptr);
}
-inline void InspectorInstrumentation::didFinishXHRLoading(ScriptExecutionContext* context, unsigned long identifier, std::optional<String> decodedText, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber)
+inline void InspectorInstrumentation::didFinishXHRLoading(ScriptExecutionContext* context, unsigned long identifier, std::optional<String> decodedText)
{
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
- didFinishXHRLoadingImpl(*instrumentingAgents, identifier, decodedText, url, sendURL, sendLineNumber, sendColumnNumber);
+ didFinishXHRLoadingImpl(*instrumentingAgents, identifier, decodedText);
}
inline void InspectorInstrumentation::willLoadXHRSynchronously(ScriptExecutionContext* context)
Modified: trunk/Source/WebCore/inspector/WebConsoleAgent.cpp (223819 => 223820)
--- trunk/Source/WebCore/inspector/WebConsoleAgent.cpp 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/WebCore/inspector/WebConsoleAgent.cpp 2017-10-21 22:23:00 UTC (rev 223820)
@@ -46,11 +46,6 @@
{
}
-void WebConsoleAgent::setMonitoringXHREnabled(ErrorString&, bool enabled)
-{
- m_monitoringXHREnabled = enabled;
-}
-
void WebConsoleAgent::frameWindowDiscarded(DOMWindow* window)
{
for (auto& message : m_consoleMessages) {
@@ -65,17 +60,6 @@
static_cast<WebInjectedScriptManager&>(m_injectedScriptManager).discardInjectedScriptsFor(window);
}
-void WebConsoleAgent::didFinishXHRLoading(unsigned long requestIdentifier, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber)
-{
- if (!m_injectedScriptManager.inspectorEnvironment().developerExtrasEnabled())
- return;
-
- if (m_monitoringXHREnabled) {
- String message = "XHR finished loading: \"" + url + "\".";
- addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::Network, MessageType::Log, MessageLevel::Debug, message, sendURL, sendLineNumber, sendColumnNumber, nullptr, requestIdentifier));
- }
-}
-
void WebConsoleAgent::didReceiveResponse(unsigned long requestIdentifier, const ResourceResponse& response)
{
if (!m_injectedScriptManager.inspectorEnvironment().developerExtrasEnabled())
Modified: trunk/Source/WebCore/inspector/WebConsoleAgent.h (223819 => 223820)
--- trunk/Source/WebCore/inspector/WebConsoleAgent.h 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/WebCore/inspector/WebConsoleAgent.h 2017-10-21 22:23:00 UTC (rev 223820)
@@ -41,16 +41,10 @@
WebConsoleAgent(Inspector::AgentContext&, Inspector::InspectorHeapAgent*);
virtual ~WebConsoleAgent() = default;
- void setMonitoringXHREnabled(ErrorString&, bool enabled) final;
-
void frameWindowDiscarded(DOMWindow*);
- void didFinishXHRLoading(unsigned long requestIdentifier, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber);
void didReceiveResponse(unsigned long requestIdentifier, const ResourceResponse&);
void didFailLoading(unsigned long requestIdentifier, const ResourceError&);
-
-protected:
- bool m_monitoringXHREnabled { false };
};
} // namespace WebCore
Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (223819 => 223820)
--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp 2017-10-21 22:23:00 UTC (rev 223820)
@@ -43,7 +43,6 @@
#include "ParsedContentType.h"
#include "ResourceError.h"
#include "ResourceRequest.h"
-#include "ScriptController.h"
#include "SecurityOriginPolicy.h"
#include "Settings.h"
#include "SharedBuffer.h"
@@ -54,7 +53,6 @@
#include "XMLHttpRequestProgressEvent.h"
#include "XMLHttpRequestUpload.h"
#include "markup.h"
-#include <interpreter/StackVisitor.h>
#include <mutex>
#include <runtime/ArrayBuffer.h>
#include <runtime/ArrayBufferView.h>
@@ -280,12 +278,6 @@
return responseURL.string();
}
-void XMLHttpRequest::setLastSendLineAndColumnNumber(unsigned lineNumber, unsigned columnNumber)
-{
- m_lastSendLineNumber = lineNumber;
- m_lastSendColumnNumber = columnNumber;
-}
-
XMLHttpRequestUpload* XMLHttpRequest::upload()
{
if (!m_upload)
@@ -433,47 +425,7 @@
return std::nullopt;
}
-namespace {
-
-// FIXME: This should be abstracted out, so that any IDL function can be passed the line/column/url tuple.
-
-// FIXME: This should probably use ShadowChicken so that we get the right frame even when it did a tail call.
-// https://bugs.webkit.org/show_bug.cgi?id=155688
-
-class SendFunctor {
-public:
- SendFunctor() = default;
-
- unsigned line() const { return m_line; }
- unsigned column() const { return m_column; }
- String url() const { return m_url; }
-
- JSC::StackVisitor::Status operator()(JSC::StackVisitor& visitor) const
- {
- if (!m_hasSkippedFirstFrame) {
- m_hasSkippedFirstFrame = true;
- return JSC::StackVisitor::Continue;
- }
-
- unsigned line = 0;
- unsigned column = 0;
- visitor->computeLineAndColumn(line, column);
- m_line = line;
- m_column = column;
- m_url = visitor->sourceURL();
- return JSC::StackVisitor::Done;
- }
-
-private:
- mutable bool m_hasSkippedFirstFrame { false };
- mutable unsigned m_line { 0 };
- mutable unsigned m_column { 0 };
- mutable String m_url;
-};
-
-}
-
-ExceptionOr<void> XMLHttpRequest::send(JSC::ExecState& state, std::optional<SendTypes>&& sendType)
+ExceptionOr<void> XMLHttpRequest::send(std::optional<SendTypes>&& sendType)
{
InspectorInstrumentation::willSendXMLHttpRequest(scriptExecutionContext(), url());
@@ -491,11 +443,6 @@
);
}
- SendFunctor functor;
- state.iterate(functor);
- setLastSendLineAndColumnNumber(functor.line(), functor.column());
- setLastSendURL(functor.url());
-
return result;
}
@@ -992,7 +939,7 @@
std::optional<String> decodedText;
if (!m_binaryResponseBuilder)
decodedText = m_responseBuilder.toStringPreserveCapacity();
- InspectorInstrumentation::didFinishXHRLoading(scriptExecutionContext(), identifier, decodedText, m_url, m_lastSendURL, m_lastSendLineNumber, m_lastSendColumnNumber);
+ InspectorInstrumentation::didFinishXHRLoading(scriptExecutionContext(), identifier, decodedText);
bool hadLoader = m_loader;
m_loader = nullptr;
Modified: trunk/Source/WebCore/xml/XMLHttpRequest.h (223819 => 223820)
--- trunk/Source/WebCore/xml/XMLHttpRequest.h 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.h 2017-10-21 22:23:00 UTC (rev 223820)
@@ -35,7 +35,6 @@
namespace JSC {
class ArrayBuffer;
class ArrayBufferView;
-class ExecState;
}
namespace WebCore {
@@ -80,7 +79,7 @@
ExceptionOr<void> open(const String& method, const String& url);
ExceptionOr<void> open(const String& method, const URL&, bool async);
ExceptionOr<void> open(const String& method, const String&, bool async, const String& user, const String& password);
- ExceptionOr<void> send(JSC::ExecState&, std::optional<SendTypes>&&);
+ ExceptionOr<void> send(std::optional<SendTypes>&&);
void abort();
ExceptionOr<void> setRequestHeader(const String& name, const String& value);
ExceptionOr<void> overrideMimeType(const String& override);
@@ -109,9 +108,6 @@
String responseURL() const;
- void setLastSendLineAndColumnNumber(unsigned lineNumber, unsigned columnNumber);
- void setLastSendURL(const String& url) { m_lastSendURL = url; }
-
XMLHttpRequestUpload* upload();
XMLHttpRequestUpload* optionalUpload() const { return m_upload.get(); }
@@ -218,9 +214,6 @@
// Used for progress event tracking.
long long m_receivedLength { 0 };
- unsigned m_lastSendLineNumber { 0 };
- unsigned m_lastSendColumnNumber { 0 };
- String m_lastSendURL;
std::optional<ExceptionCode> m_exceptionCode;
XMLHttpRequestProgressEventThrottle m_progressEventThrottle;
Modified: trunk/Source/WebCore/xml/XMLHttpRequest.idl (223819 => 223820)
--- trunk/Source/WebCore/xml/XMLHttpRequest.idl 2017-10-21 21:48:17 UTC (rev 223819)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.idl 2017-10-21 22:23:00 UTC (rev 223820)
@@ -66,7 +66,7 @@
attribute unsigned long timeout;
attribute boolean withCredentials;
readonly attribute XMLHttpRequestUpload upload;
- [CallWith=ScriptState, MayThrowException] void send(optional (Document or BodyInit)? body = null);
+ [MayThrowException] void send(optional (Document or BodyInit)? body = null);
void abort();
// response