+2017-10-23 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: Remove unused Console.setMonitoringXHREnabled
+ https://bugs.webkit.org/show_bug.cgi?id=178617
+
+ Reviewed by Sam Weinig.
+
+ * JavaScriptCore.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-23 JF Bastien <jfbastien@apple.com>
WebAssembly: topEntryFrame on Wasm::Instance
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, ); }; };
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>"; };
A50E4B5E18809DD50068A46D /* InspectorRuntimeAgent.h */,
A55165D01BDEFDBD003B75C1 /* InspectorScriptProfilerAgent.cpp */,
A55165D11BDEFDBD003B75C1 /* InspectorScriptProfilerAgent.h */,
- A5FD0083189B1B7E00633231 /* JSGlobalObjectConsoleAgent.cpp */,
- A5FD0084189B1B7E00633231 /* JSGlobalObjectConsoleAgent.h */,
A57D23E71891B0770031C7FA /* JSGlobalObjectDebuggerAgent.cpp */,
A57D23E81891B0770031C7FA /* JSGlobalObjectDebuggerAgent.h */,
A50E4B5F18809DD50068A46D /* JSGlobalObjectRuntimeAgent.cpp */,
0FEC85BB1BE1462F0080FF74 /* B3InsertionSetInlines.h in Headers */,
0FDF67D21D9C6D27001B9825 /* B3Kind.h in Headers */,
436E54531C468E7400B5AF73 /* B3LegalizeMemoryOffsets.h in Headers */,
- AD5C36EC1F75AD7C000BCAAF /* WasmToJS.h in Headers */,
0F338E1E1BF286EA0013C88F /* B3LowerMacros.h in Headers */,
4319DA041C1BE40D001D260B /* B3LowerMacrosAfterOptimizations.h in Headers */,
0FEC851E1BDACDAC0080FF74 /* B3LowerToAir.h in Headers */,
866739D213BFDE710023D87C /* BigInteger.h in Headers */,
0F64B2721A784BAF006E4E66 /* BinarySwitch.h in Headers */,
BC18C3EC0E16F5CD00B34460 /* BooleanObject.h in Headers */,
+ 9B4694391F97439E00CCB3F9 /* BooleanPrototype.h in Headers */,
996B73191BDA068000331B84 /* BooleanPrototype.lut.h in Headers */,
FEA08620182B7A0400F6D851 /* Breakpoint.h in Headers */,
- 9B4694391F97439E00CCB3F9 /* BooleanPrototype.h in Headers */,
DE26E9031CB5DD0500D2BE82 /* BuiltinExecutableCreator.h in Headers */,
A7D801A51880D66E0026C39B /* BuiltinExecutables.h in Headers */,
A75EE9B218AAB7E200AAD043 /* BuiltinNames.h in Headers */,
E328DAEB1D38D005001A2529 /* BytecodeRewriter.h in Headers */,
6514F21918B3E1670098FF8B /* Bytecodes.h in Headers */,
0F885E111849A3BE00F1E3FA /* BytecodeUseDef.h in Headers */,
- AD5C36EB1F75AD73000BCAAF /* JSWebAssembly.h in Headers */,
0F8023EA1613832B00A0BA45 /* ByValInfo.h in Headers */,
65B8392E1BACAD360044E824 /* CachedRecovery.h in Headers */,
0FEC3C601F379F5300F59B6C /* CagedBarrierPtr.h in Headers */,
0FA581BC150E953000B9A2D9 /* DFGNodeType.h in Headers */,
DCEE220D1CEBAF75000C2396 /* DFGNullAbstractState.h in Headers */,
0F2B9CE719D0BA7D00B1D1B5 /* DFGObjectAllocationSinkingPhase.h in Headers */,
- AD5C36DD1F688B65000BCAAF /* WasmEmbedder.h in Headers */,
0F2B9CE919D0BA7D00B1D1B5 /* DFGObjectMaterializationData.h in Headers */,
86EC9DD01328DF82002B2AD7 /* DFGOperations.h in Headers */,
0F7C39FF1C90C55B00480151 /* DFGOpInfo.h in Headers */,
0F3AC754188E5EC80032029F /* ExitingJITType.h in Headers */,
0FB105861675481200F8AB6E /* ExitKind.h in Headers */,
0F0B83AB14BCF5BB00885B4F /* ExpressionRangeInfo.h in Headers */,
- AD5C36EA1F75AD6A000BCAAF /* JSToWasm.h in Headers */,
0FEC3C571F33A45300F59B6C /* FastMallocAlignedMemoryAllocator.h in Headers */,
A7A8AF3817ADB5F3005AB174 /* Float32Array.h in Headers */,
- AD5C36E21F699EC0000BCAAF /* WasmInstance.h in Headers */,
A7A8AF3917ADB5F3005AB174 /* Float64Array.h in Headers */,
0F24E54317EA9F5900ABB217 /* FPRInfo.h in Headers */,
E34EDBF71DB5FFC900DC87A5 /* FrameTracers.h in Headers */,
A125846F1B45A36000CC7F6C /* IntlNumberFormatPrototype.lut.h in Headers */,
A12BBFF21B044A8B00664B69 /* IntlObject.h in Headers */,
708EBE241CE8F35800453146 /* IntlObjectInlines.h in Headers */,
- 79AC30FF1F99536400484FD7 /* ObjectAllocationProfileInlines.h in Headers */,
860BD801148EA6F200112B2F /* Intrinsic.h in Headers */,
534E03541E53BD2900213F64 /* IntrinsicGetterAccessCase.h in Headers */,
8B9F6D561D5912FA001C739F /* IterationKind.h in Headers */,
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 */,
0F7DF13F1E2AFC4D0095951B /* JSStringSubspace.h in Headers */,
0F919D0D157EE0A2004A4E7D /* JSSymbolTableObject.h in Headers */,
70ECA6061AFDBEA200449739 /* JSTemplateRegistryKey.h in Headers */,
+ AD5C36EA1F75AD6A000BCAAF /* JSToWasm.h in Headers */,
BC18C42A0E16F5CD00B34460 /* JSType.h in Headers */,
53486BB71C1795C300F6F3AF /* JSTypedArray.h in Headers */,
0F2B66FB17B6B5AB00A7AE3F /* JSTypedArrayConstructors.h in Headers */,
A7482B9311671147003B0712 /* JSWeakObjectMapRefPrivate.h in Headers */,
0F0B286B1EB8E6CF000EB5D2 /* JSWeakPrivate.h in Headers */,
709FB8681AE335C60039D069 /* JSWeakSet.h in Headers */,
+ AD5C36EB1F75AD73000BCAAF /* JSWebAssembly.h in Headers */,
AD9E852F1E8A0C7C008DE39E /* JSWebAssemblyCodeBlock.h in Headers */,
79EFD4841EBC045C00F3DFEA /* JSWebAssemblyCodeBlockSubspace.h in Headers */,
AD2FCBE31DB58DAD00B3E736 /* JSWebAssemblyCompileError.h in Headers */,
86F3EEBD168CDE930077B92A /* ObjCCallbackFunction.h in Headers */,
86F3EEBF168CDE930077B92A /* ObjcRuntimeExtras.h in Headers */,
14CA958D16AB50FA00938A06 /* ObjectAllocationProfile.h in Headers */,
+ 79AC30FF1F99536400484FD7 /* ObjectAllocationProfileInlines.h in Headers */,
BC18C4450E16F5CD00B34460 /* ObjectConstructor.h in Headers */,
996B73221BDA08EF00331B84 /* ObjectConstructor.lut.h in Headers */,
FE48E6381EB118D2005D7A96 /* ObjectInitializationScope.h in Headers */,
BCD202D60E170708002C7E82 /* RegExpConstructor.lut.h in Headers */,
0F7C39FB1C8F629300480151 /* RegExpInlines.h in Headers */,
A1712B4111C7B235007A5315 /* RegExpKey.h in Headers */,
- AD5C36E61F69EC91000BCAAF /* WasmTable.h in Headers */,
BC18C45B0E16F5CD00B34460 /* RegExpObject.h in Headers */,
0F7C39FD1C8F659500480151 /* RegExpObjectInlines.h in Headers */,
BCD202C40E1706A7002C7E82 /* RegExpPrototype.h in Headers */,
0FE0502D1AA9095600D33B33 /* VarOffset.h in Headers */,
0F426A491460CBB700131F8F /* VirtualRegister.h in Headers */,
0F1FB3931E177A7200A9BE50 /* VisitingTimeout.h in Headers */,
- AD5C36EF1F7A263A000BCAAF /* WasmMemoryMode.h in Headers */,
0F952AA11DF7860900E06FBD /* VisitRaceKey.h in Headers */,
BC18C4200E16F5CD00B34460 /* VM.h in Headers */,
658D3A5619638268003C45D6 /* VMEntryRecord.h in Headers */,
53FD04D41D7AB291003287D3 /* WasmCallingConvention.h in Headers */,
526AC4B71E977C5D003500E1 /* WasmCodeBlock.h in Headers */,
AD412B341E7B2E9E008AF157 /* WasmContext.h in Headers */,
+ AD5C36DD1F688B65000BCAAF /* WasmEmbedder.h in Headers */,
79DAE27A1E03C82200B526AA /* WasmExceptionType.h in Headers */,
5381B9391E60E97D0090F794 /* WasmFaultSignalHandler.h in Headers */,
7BC547D31B6959A100959B58 /* WasmFormat.h in Headers */,
53F40E8B1D5901BB0099A1B6 /* WasmFunctionParser.h in Headers */,
AD8FF3981EB5BDB20087FF82 /* WasmIndexOrName.h in Headers */,
+ AD5C36E21F699EC0000BCAAF /* WasmInstance.h in Headers */,
AD00659E1ECAC812000CA926 /* WasmLimits.h in Headers */,
53E9E0AC1EAE83DF00FEE251 /* WasmMachineThreads.h in Headers */,
535557141D9D9EA5006D583B /* WasmMemory.h in Headers */,
79B759751DFA4C600052174C /* WasmMemoryInformation.h in Headers */,
+ AD5C36EF1F7A263A000BCAAF /* WasmMemoryMode.h in Headers */,
790081391E95A8EC0052D7CD /* WasmModule.h in Headers */,
53E777E41E92E265007CBEC4 /* WasmModuleInformation.h in Headers */,
53F40E951D5A7AEF0099A1B6 /* WasmModuleParser.h in Headers */,
531374BD1D5CE67600AF7A0B /* WasmPlan.h in Headers */,
53F40E851D58F9770099A1B6 /* WasmSections.h in Headers */,
AD7438C01E0457A400FD0C2A /* WasmSignature.h in Headers */,
+ AD5C36E61F69EC91000BCAAF /* WasmTable.h in Headers */,
5250D2D21E8DA05A0029A932 /* WasmThunks.h in Headers */,
53E9E0AF1EAEC45700FEE251 /* WasmTierUpCount.h in Headers */,
+ AD5C36EC1F75AD7C000BCAAF /* WasmToJS.h in Headers */,
53FF7F991DBFCD9000A26CCC /* WasmValidate.h in Headers */,
530FB3021E7A0B6E003C19DD /* WasmWorklist.h in Headers */,
FED94F2F171E3E2300BE77A4 /* Watchdog.h in Headers */,
inspector/agents/InspectorHeapAgent.cpp
inspector/agents/InspectorRuntimeAgent.cpp
inspector/agents/InspectorScriptProfilerAgent.cpp
-inspector/agents/JSGlobalObjectConsoleAgent.cpp
inspector/agents/JSGlobalObjectDebuggerAgent.cpp
inspector/agents/JSGlobalObjectRuntimeAgent.cpp
#include "InjectedScriptManager.h"
#include "InspectorAgent.h"
#include "InspectorBackendDispatcher.h"
+#include "InspectorConsoleAgent.h"
#include "InspectorFrontendChannel.h"
#include "InspectorFrontendRouter.h"
#include "InspectorHeapAgent.h"
#include "InspectorScriptProfilerAgent.h"
#include "JSCInlines.h"
#include "JSGlobalObject.h"
-#include "JSGlobalObjectConsoleAgent.h"
#include "JSGlobalObjectConsoleClient.h"
#include "JSGlobalObjectDebuggerAgent.h"
#include "JSGlobalObjectRuntimeAgent.h"
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);
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();
+++ /dev/null
-/*
- * 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
+++ /dev/null
-/*
- * 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
{
"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": [
+2017-10-23 Joseph Pecoraro <pecoraro@apple.com>
+
+ 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-23 Keith Miller <keith_miller@apple.com>
Add dom, editing, fileapi, and history to unified sources
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);
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);
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);
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)
{
}
-void WebConsoleAgent::setMonitoringXHREnabled(ErrorString&, bool enabled)
-{
- m_monitoringXHREnabled = enabled;
-}
-
void WebConsoleAgent::frameWindowDiscarded(DOMWindow* window)
{
for (auto& message : m_consoleMessages) {
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())
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
#include "ContentSecurityPolicy.h"
#include "CrossOriginAccessControl.h"
#include "DOMFormData.h"
+#include "DOMWindow.h"
#include "Event.h"
#include "EventNames.h"
#include "File.h"
#include "ParsedContentType.h"
#include "ResourceError.h"
#include "ResourceRequest.h"
-#include "ScriptController.h"
#include "SecurityOriginPolicy.h"
#include "Settings.h"
#include "SharedBuffer.h"
#include "XMLHttpRequestProgressEvent.h"
#include "XMLHttpRequestUpload.h"
#include "markup.h"
-#include <interpreter/StackVisitor.h>
#include <mutex>
#include <runtime/ArrayBuffer.h>
#include <runtime/ArrayBufferView.h>
return responseURL.string();
}
-void XMLHttpRequest::setLastSendLineAndColumnNumber(unsigned lineNumber, unsigned columnNumber)
-{
- m_lastSendLineNumber = lineNumber;
- m_lastSendColumnNumber = columnNumber;
-}
-
XMLHttpRequestUpload* XMLHttpRequest::upload()
{
if (!m_upload)
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());
);
}
- SendFunctor functor;
- state.iterate(functor);
- setLastSendLineAndColumnNumber(functor.line(), functor.column());
- setLastSendURL(functor.url());
-
return result;
}
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;
namespace JSC {
class ArrayBuffer;
class ArrayBufferView;
-class ExecState;
}
namespace WebCore {
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);
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(); }
// 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;
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