Changeset 223868 in webkit


Ignore:
Timestamp:
Oct 23, 2017 5:55:54 PM (6 years ago)
Author:
BJ Burg
Message:

Web Inspector: Remove unused Console.setMonitoringXHREnabled
https://bugs.webkit.org/show_bug.cgi?id=178617

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-23
Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • 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.

Source/WebCore:

  • 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().

Location:
trunk/Source
Files:
2 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r223866 r223868  
     12017-10-23  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Remove unused Console.setMonitoringXHREnabled
     4        https://bugs.webkit.org/show_bug.cgi?id=178617
     5
     6        Reviewed by Sam Weinig.
     7
     8        * JavaScriptCore.xcodeproj/project.pbxproj:
     9        * Sources.txt:
     10        * inspector/agents/InspectorConsoleAgent.h:
     11        * inspector/agents/JSGlobalObjectConsoleAgent.cpp: Removed.
     12        * inspector/agents/JSGlobalObjectConsoleAgent.h: Removed.
     13        * inspector/protocol/Console.json:
     14        Removed files and method.
     15
     16        * inspector/JSGlobalObjectInspectorController.cpp:
     17        (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
     18        This can use the base ConsoleAgent now.
     19
    1202017-10-23  JF Bastien  <jfbastien@apple.com>
    221
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r223836 r223868  
    13361336                A5FD007E189B0B4C00633231 /* ScriptCallStackFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = A5FD007C189B0B4C00633231 /* ScriptCallStackFactory.h */; settings = {ATTRIBUTES = (Private, ); }; };
    13371337                A5FD0082189B191A00633231 /* InspectorConsoleAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = A5FD0080189B191A00633231 /* InspectorConsoleAgent.h */; settings = {ATTRIBUTES = (Private, ); }; };
    1338                 A5FD0086189B1B7E00633231 /* JSGlobalObjectConsoleAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = A5FD0084189B1B7E00633231 /* JSGlobalObjectConsoleAgent.h */; };
    13391338                A700873A17CBE85300C3E643 /* MapConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = A700873817CBE85300C3E643 /* MapConstructor.h */; };
    13401339                A700873E17CBE8D300C3E643 /* MapPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = A700873C17CBE8D300C3E643 /* MapPrototype.h */; };
     
    39583957                A5FD007F189B191A00633231 /* InspectorConsoleAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorConsoleAgent.cpp; sourceTree = "<group>"; };
    39593958                A5FD0080189B191A00633231 /* InspectorConsoleAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorConsoleAgent.h; sourceTree = "<group>"; };
    3960                 A5FD0083189B1B7E00633231 /* JSGlobalObjectConsoleAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectConsoleAgent.cpp; sourceTree = "<group>"; };
    3961                 A5FD0084189B1B7E00633231 /* JSGlobalObjectConsoleAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObjectConsoleAgent.h; sourceTree = "<group>"; };
    39623959                A700873717CBE85300C3E643 /* MapConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MapConstructor.cpp; sourceTree = "<group>"; };
    39633960                A700873817CBE85300C3E643 /* MapConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapConstructor.h; sourceTree = "<group>"; };
     
    75617558                                A55165D01BDEFDBD003B75C1 /* InspectorScriptProfilerAgent.cpp */,
    75627559                                A55165D11BDEFDBD003B75C1 /* InspectorScriptProfilerAgent.h */,
    7563                                 A5FD0083189B1B7E00633231 /* JSGlobalObjectConsoleAgent.cpp */,
    7564                                 A5FD0084189B1B7E00633231 /* JSGlobalObjectConsoleAgent.h */,
    75657560                                A57D23E71891B0770031C7FA /* JSGlobalObjectDebuggerAgent.cpp */,
    75667561                                A57D23E81891B0770031C7FA /* JSGlobalObjectDebuggerAgent.h */,
     
    80458040                                0FDF67D21D9C6D27001B9825 /* B3Kind.h in Headers */,
    80468041                                436E54531C468E7400B5AF73 /* B3LegalizeMemoryOffsets.h in Headers */,
    8047                                 AD5C36EC1F75AD7C000BCAAF /* WasmToJS.h in Headers */,
    80488042                                0F338E1E1BF286EA0013C88F /* B3LowerMacros.h in Headers */,
    80498043                                4319DA041C1BE40D001D260B /* B3LowerMacrosAfterOptimizations.h in Headers */,
     
    81028096                                0F64B2721A784BAF006E4E66 /* BinarySwitch.h in Headers */,
    81038097                                BC18C3EC0E16F5CD00B34460 /* BooleanObject.h in Headers */,
     8098                                9B4694391F97439E00CCB3F9 /* BooleanPrototype.h in Headers */,
    81048099                                996B73191BDA068000331B84 /* BooleanPrototype.lut.h in Headers */,
    81058100                                FEA08620182B7A0400F6D851 /* Breakpoint.h in Headers */,
    8106                                 9B4694391F97439E00CCB3F9 /* BooleanPrototype.h in Headers */,
    81078101                                DE26E9031CB5DD0500D2BE82 /* BuiltinExecutableCreator.h in Headers */,
    81088102                                A7D801A51880D66E0026C39B /* BuiltinExecutables.h in Headers */,
     
    81378131                                6514F21918B3E1670098FF8B /* Bytecodes.h in Headers */,
    81388132                                0F885E111849A3BE00F1E3FA /* BytecodeUseDef.h in Headers */,
    8139                                 AD5C36EB1F75AD73000BCAAF /* JSWebAssembly.h in Headers */,
    81408133                                0F8023EA1613832B00A0BA45 /* ByValInfo.h in Headers */,
    81418134                                65B8392E1BACAD360044E824 /* CachedRecovery.h in Headers */,
     
    83428335                                DCEE220D1CEBAF75000C2396 /* DFGNullAbstractState.h in Headers */,
    83438336                                0F2B9CE719D0BA7D00B1D1B5 /* DFGObjectAllocationSinkingPhase.h in Headers */,
    8344                                 AD5C36DD1F688B65000BCAAF /* WasmEmbedder.h in Headers */,
    83458337                                0F2B9CE919D0BA7D00B1D1B5 /* DFGObjectMaterializationData.h in Headers */,
    83468338                                86EC9DD01328DF82002B2AD7 /* DFGOperations.h in Headers */,
     
    84538445                                0FB105861675481200F8AB6E /* ExitKind.h in Headers */,
    84548446                                0F0B83AB14BCF5BB00885B4F /* ExpressionRangeInfo.h in Headers */,
    8455                                 AD5C36EA1F75AD6A000BCAAF /* JSToWasm.h in Headers */,
    84568447                                0FEC3C571F33A45300F59B6C /* FastMallocAlignedMemoryAllocator.h in Headers */,
    84578448                                A7A8AF3817ADB5F3005AB174 /* Float32Array.h in Headers */,
    8458                                 AD5C36E21F699EC0000BCAAF /* WasmInstance.h in Headers */,
    84598449                                A7A8AF3917ADB5F3005AB174 /* Float64Array.h in Headers */,
    84608450                                0F24E54317EA9F5900ABB217 /* FPRInfo.h in Headers */,
     
    86668656                                A12BBFF21B044A8B00664B69 /* IntlObject.h in Headers */,
    86678657                                708EBE241CE8F35800453146 /* IntlObjectInlines.h in Headers */,
    8668                                 79AC30FF1F99536400484FD7 /* ObjectAllocationProfileInlines.h in Headers */,
    86698658                                860BD801148EA6F200112B2F /* Intrinsic.h in Headers */,
    86708659                                534E03541E53BD2900213F64 /* IntrinsicGetterAccessCase.h in Headers */,
     
    87658754                                BC18C4210E16F5CD00B34460 /* JSGlobalObject.h in Headers */,
    87668755                                996B731D1BDA08EF00331B84 /* JSGlobalObject.lut.h in Headers */,
    8767                                 A5FD0086189B1B7E00633231 /* JSGlobalObjectConsoleAgent.h in Headers */,
    87688756                                A5C3A1A618C0490200C9593A /* JSGlobalObjectConsoleClient.h in Headers */,
    87698757                                A59455931824744700CC3843 /* JSGlobalObjectDebuggable.h in Headers */,
     
    88388826                                0F919D0D157EE0A2004A4E7D /* JSSymbolTableObject.h in Headers */,
    88398827                                70ECA6061AFDBEA200449739 /* JSTemplateRegistryKey.h in Headers */,
     8828                                AD5C36EA1F75AD6A000BCAAF /* JSToWasm.h in Headers */,
    88408829                                BC18C42A0E16F5CD00B34460 /* JSType.h in Headers */,
    88418830                                53486BB71C1795C300F6F3AF /* JSTypedArray.h in Headers */,
     
    88608849                                0F0B286B1EB8E6CF000EB5D2 /* JSWeakPrivate.h in Headers */,
    88618850                                709FB8681AE335C60039D069 /* JSWeakSet.h in Headers */,
     8851                                AD5C36EB1F75AD73000BCAAF /* JSWebAssembly.h in Headers */,
    88628852                                AD9E852F1E8A0C7C008DE39E /* JSWebAssemblyCodeBlock.h in Headers */,
    88638853                                79EFD4841EBC045C00F3DFEA /* JSWebAssemblyCodeBlockSubspace.h in Headers */,
     
    89708960                                86F3EEBF168CDE930077B92A /* ObjcRuntimeExtras.h in Headers */,
    89718961                                14CA958D16AB50FA00938A06 /* ObjectAllocationProfile.h in Headers */,
     8962                                79AC30FF1F99536400484FD7 /* ObjectAllocationProfileInlines.h in Headers */,
    89728963                                BC18C4450E16F5CD00B34460 /* ObjectConstructor.h in Headers */,
    89738964                                996B73221BDA08EF00331B84 /* ObjectConstructor.lut.h in Headers */,
     
    90529043                                0F7C39FB1C8F629300480151 /* RegExpInlines.h in Headers */,
    90539044                                A1712B4111C7B235007A5315 /* RegExpKey.h in Headers */,
    9054                                 AD5C36E61F69EC91000BCAAF /* WasmTable.h in Headers */,
    90559045                                BC18C45B0E16F5CD00B34460 /* RegExpObject.h in Headers */,
    90569046                                0F7C39FD1C8F659500480151 /* RegExpObjectInlines.h in Headers */,
     
    92249214                                0F426A491460CBB700131F8F /* VirtualRegister.h in Headers */,
    92259215                                0F1FB3931E177A7200A9BE50 /* VisitingTimeout.h in Headers */,
    9226                                 AD5C36EF1F7A263A000BCAAF /* WasmMemoryMode.h in Headers */,
    92279216                                0F952AA11DF7860900E06FBD /* VisitRaceKey.h in Headers */,
    92289217                                BC18C4200E16F5CD00B34460 /* VM.h in Headers */,
     
    92409229                                526AC4B71E977C5D003500E1 /* WasmCodeBlock.h in Headers */,
    92419230                                AD412B341E7B2E9E008AF157 /* WasmContext.h in Headers */,
     9231                                AD5C36DD1F688B65000BCAAF /* WasmEmbedder.h in Headers */,
    92429232                                79DAE27A1E03C82200B526AA /* WasmExceptionType.h in Headers */,
    92439233                                5381B9391E60E97D0090F794 /* WasmFaultSignalHandler.h in Headers */,
     
    92459235                                53F40E8B1D5901BB0099A1B6 /* WasmFunctionParser.h in Headers */,
    92469236                                AD8FF3981EB5BDB20087FF82 /* WasmIndexOrName.h in Headers */,
     9237                                AD5C36E21F699EC0000BCAAF /* WasmInstance.h in Headers */,
    92479238                                AD00659E1ECAC812000CA926 /* WasmLimits.h in Headers */,
    92489239                                53E9E0AC1EAE83DF00FEE251 /* WasmMachineThreads.h in Headers */,
    92499240                                535557141D9D9EA5006D583B /* WasmMemory.h in Headers */,
    92509241                                79B759751DFA4C600052174C /* WasmMemoryInformation.h in Headers */,
     9242                                AD5C36EF1F7A263A000BCAAF /* WasmMemoryMode.h in Headers */,
    92519243                                790081391E95A8EC0052D7CD /* WasmModule.h in Headers */,
    92529244                                53E777E41E92E265007CBEC4 /* WasmModuleInformation.h in Headers */,
     
    92629254                                53F40E851D58F9770099A1B6 /* WasmSections.h in Headers */,
    92639255                                AD7438C01E0457A400FD0C2A /* WasmSignature.h in Headers */,
     9256                                AD5C36E61F69EC91000BCAAF /* WasmTable.h in Headers */,
    92649257                                5250D2D21E8DA05A0029A932 /* WasmThunks.h in Headers */,
    92659258                                53E9E0AF1EAEC45700FEE251 /* WasmTierUpCount.h in Headers */,
     9259                                AD5C36EC1F75AD7C000BCAAF /* WasmToJS.h in Headers */,
    92669260                                53FF7F991DBFCD9000A26CCC /* WasmValidate.h in Headers */,
    92679261                                530FB3021E7A0B6E003C19DD /* WasmWorklist.h in Headers */,
  • trunk/Source/JavaScriptCore/Sources.txt

    r223836 r223868  
    558558inspector/agents/InspectorRuntimeAgent.cpp
    559559inspector/agents/InspectorScriptProfilerAgent.cpp
    560 inspector/agents/JSGlobalObjectConsoleAgent.cpp
    561560inspector/agents/JSGlobalObjectDebuggerAgent.cpp
    562561inspector/agents/JSGlobalObjectRuntimeAgent.cpp
  • trunk/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp

    r223836 r223868  
    3636#include "InspectorAgent.h"
    3737#include "InspectorBackendDispatcher.h"
     38#include "InspectorConsoleAgent.h"
    3839#include "InspectorFrontendChannel.h"
    3940#include "InspectorFrontendRouter.h"
     
    4243#include "JSCInlines.h"
    4344#include "JSGlobalObject.h"
    44 #include "JSGlobalObjectConsoleAgent.h"
    4545#include "JSGlobalObjectConsoleClient.h"
    4646#include "JSGlobalObjectDebuggerAgent.h"
     
    8484    auto runtimeAgent = std::make_unique<JSGlobalObjectRuntimeAgent>(context);
    8585    auto heapAgent = std::make_unique<InspectorHeapAgent>(context);
    86     auto consoleAgent = std::make_unique<JSGlobalObjectConsoleAgent>(context, heapAgent.get());
     86    auto consoleAgent = std::make_unique<InspectorConsoleAgent>(context, heapAgent.get());
    8787    auto debuggerAgent = std::make_unique<JSGlobalObjectDebuggerAgent>(context, consoleAgent.get());
    8888    auto scriptProfilerAgent = std::make_unique<InspectorScriptProfilerAgent>(context);
  • trunk/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h

    r223836 r223868  
    6262    void disable(ErrorString&) override;
    6363    void clearMessages(ErrorString&) override;
    64     void setMonitoringXHREnabled(ErrorString&, bool enabled) override = 0;
    6564
    6665    bool enabled() const { return m_enabled; }
  • trunk/Source/JavaScriptCore/inspector/protocol/Console.json

    r223836 r223868  
    5858            "name": "clearMessages",
    5959            "description": "Clears console messages collected in the browser."
    60         },
    61         {
    62             "name": "setMonitoringXHREnabled",
    63             "description": "Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued.",
    64             "parameters": [
    65                 { "name": "enabled", "type": "boolean", "description": "Monitoring enabled state." }
    66             ]
    6760        }
    6861    ],
  • trunk/Source/WebCore/ChangeLog

    r223865 r223868  
     12017-10-23  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Remove unused Console.setMonitoringXHREnabled
     4        https://bugs.webkit.org/show_bug.cgi?id=178617
     5
     6        Reviewed by Sam Weinig.
     7
     8        * inspector/InspectorInstrumentation.cpp:
     9        (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
     10        * inspector/InspectorInstrumentation.h:
     11        (WebCore::InspectorInstrumentation::didFinishXHRLoading):
     12        * inspector/WebConsoleAgent.cpp:
     13        (WebCore::WebConsoleAgent::setMonitoringXHREnabled): Deleted.
     14        (WebCore::WebConsoleAgent::didFinishXHRLoading): Deleted.
     15        * inspector/WebConsoleAgent.h:
     16        Remove XHR monitoring code.
     17
     18        * xml/XMLHttpRequest.h:
     19        * xml/XMLHttpRequest.cpp:
     20        (WebCore::XMLHttpRequest::send):
     21        (WebCore::XMLHttpRequest::didFinishLoading):
     22        (WebCore::XMLHttpRequest::setLastSendLineAndColumnNumber): Deleted.
     23        * xml/XMLHttpRequest.idl:
     24        Remove now unused state on XHR and ExecState requirement for send().
     25
    1262017-10-23  Keith Miller  <keith_miller@apple.com>
    227
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp

    r223836 r223868  
    626626}
    627627
    628 void InspectorInstrumentation::didFinishXHRLoadingImpl(InstrumentingAgents& instrumentingAgents, unsigned long identifier, std::optional<String> decodedText, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber)
    629 {
    630     if (WebConsoleAgent* consoleAgent = instrumentingAgents.webConsoleAgent())
    631         consoleAgent->didFinishXHRLoading(identifier, url, sendURL, sendLineNumber, sendColumnNumber);
     628void InspectorInstrumentation::didFinishXHRLoadingImpl(InstrumentingAgents& instrumentingAgents, unsigned long identifier, std::optional<String> decodedText)
     629{
    632630    if (InspectorNetworkAgent* networkAgent = instrumentingAgents.inspectorNetworkAgent()) {
    633631        if (decodedText)
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.h

    r223836 r223868  
    187187    static void willSendRequestOfType(Frame*, unsigned long identifier, DocumentLoader*, ResourceRequest&, LoadType);
    188188
    189     static void didFinishXHRLoading(ScriptExecutionContext*, unsigned long identifier, std::optional<String> decodedText, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber);
     189    static void didFinishXHRLoading(ScriptExecutionContext*, unsigned long identifier, std::optional<String> decodedText);
    190190    static void willLoadXHRSynchronously(ScriptExecutionContext*);
    191191    static void didLoadXHRSynchronously(ScriptExecutionContext*);
     
    356356    static void didFinishLoadingImpl(InstrumentingAgents&, unsigned long identifier, DocumentLoader*, const NetworkLoadMetrics&, ResourceLoader*);
    357357    static void didFailLoadingImpl(InstrumentingAgents&, unsigned long identifier, DocumentLoader*, const ResourceError&);
    358     static void didFinishXHRLoadingImpl(InstrumentingAgents&, unsigned long identifier, std::optional<String> decodedText, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber);
     358    static void didFinishXHRLoadingImpl(InstrumentingAgents&, unsigned long identifier, std::optional<String> decodedText);
    359359    static void willLoadXHRSynchronouslyImpl(InstrumentingAgents&);
    360360    static void didLoadXHRSynchronouslyImpl(InstrumentingAgents&);
     
    958958}
    959959
    960 inline void InspectorInstrumentation::didFinishXHRLoading(ScriptExecutionContext* context, unsigned long identifier, std::optional<String> decodedText, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber)
    961 {
    962     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
    963         didFinishXHRLoadingImpl(*instrumentingAgents, identifier, decodedText, url, sendURL, sendLineNumber, sendColumnNumber);
     960inline void InspectorInstrumentation::didFinishXHRLoading(ScriptExecutionContext* context, unsigned long identifier, std::optional<String> decodedText)
     961{
     962    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
     963        didFinishXHRLoadingImpl(*instrumentingAgents, identifier, decodedText);
    964964}
    965965
  • trunk/Source/WebCore/inspector/WebConsoleAgent.cpp

    r223836 r223868  
    4747}
    4848
    49 void WebConsoleAgent::setMonitoringXHREnabled(ErrorString&, bool enabled)
    50 {
    51     m_monitoringXHREnabled = enabled;
    52 }
    53 
    5449void WebConsoleAgent::frameWindowDiscarded(DOMWindow* window)
    5550{
     
    6459
    6560    static_cast<WebInjectedScriptManager&>(m_injectedScriptManager).discardInjectedScriptsFor(window);
    66 }
    67 
    68 void WebConsoleAgent::didFinishXHRLoading(unsigned long requestIdentifier, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber)
    69 {
    70     if (!m_injectedScriptManager.inspectorEnvironment().developerExtrasEnabled())
    71         return;
    72 
    73     if (m_monitoringXHREnabled) {
    74         String message = "XHR finished loading: \"" + url + "\".";
    75         addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::Network, MessageType::Log, MessageLevel::Debug, message, sendURL, sendLineNumber, sendColumnNumber, nullptr, requestIdentifier));
    76     }
    7761}
    7862
  • trunk/Source/WebCore/inspector/WebConsoleAgent.h

    r223836 r223868  
    4242    virtual ~WebConsoleAgent() = default;
    4343
    44     void setMonitoringXHREnabled(ErrorString&, bool enabled) final;
    45 
    4644    void frameWindowDiscarded(DOMWindow*);
    4745
    48     void didFinishXHRLoading(unsigned long requestIdentifier, const String& url, const String& sendURL, unsigned sendLineNumber, unsigned sendColumnNumber);
    4946    void didReceiveResponse(unsigned long requestIdentifier, const ResourceResponse&);
    5047    void didFailLoading(unsigned long requestIdentifier, const ResourceError&);
    51 
    52 protected:
    53     bool m_monitoringXHREnabled { false };
    5448};
    5549
  • trunk/Source/WebCore/xml/XMLHttpRequest.cpp

    r223836 r223868  
    2929#include "CrossOriginAccessControl.h"
    3030#include "DOMFormData.h"
     31#include "DOMWindow.h"
    3132#include "Event.h"
    3233#include "EventNames.h"
     
    4445#include "ResourceError.h"
    4546#include "ResourceRequest.h"
    46 #include "ScriptController.h"
    4747#include "SecurityOriginPolicy.h"
    4848#include "Settings.h"
     
    5555#include "XMLHttpRequestUpload.h"
    5656#include "markup.h"
    57 #include <interpreter/StackVisitor.h>
    5857#include <mutex>
    5958#include <runtime/ArrayBuffer.h>
     
    281280}
    282281
    283 void XMLHttpRequest::setLastSendLineAndColumnNumber(unsigned lineNumber, unsigned columnNumber)
    284 {
    285     m_lastSendLineNumber = lineNumber;
    286     m_lastSendColumnNumber = columnNumber;
    287 }
    288 
    289282XMLHttpRequestUpload* XMLHttpRequest::upload()
    290283{
     
    434427}
    435428
    436 namespace {
    437 
    438 // FIXME: This should be abstracted out, so that any IDL function can be passed the line/column/url tuple.
    439 
    440 // FIXME: This should probably use ShadowChicken so that we get the right frame even when it did a tail call.
    441 // https://bugs.webkit.org/show_bug.cgi?id=155688
    442 
    443 class SendFunctor {
    444 public:
    445     SendFunctor() = default;
    446 
    447     unsigned line() const { return m_line; }
    448     unsigned column() const { return m_column; }
    449     String url() const { return m_url; }
    450 
    451     JSC::StackVisitor::Status operator()(JSC::StackVisitor& visitor) const
    452     {
    453         if (!m_hasSkippedFirstFrame) {
    454             m_hasSkippedFirstFrame = true;
    455             return JSC::StackVisitor::Continue;
    456         }
    457 
    458         unsigned line = 0;
    459         unsigned column = 0;
    460         visitor->computeLineAndColumn(line, column);
    461         m_line = line;
    462         m_column = column;
    463         m_url = visitor->sourceURL();
    464         return JSC::StackVisitor::Done;
    465     }
    466 
    467 private:
    468     mutable bool m_hasSkippedFirstFrame { false };
    469     mutable unsigned m_line { 0 };
    470     mutable unsigned m_column { 0 };
    471     mutable String m_url;
    472 };
    473 
    474 }
    475 
    476 ExceptionOr<void> XMLHttpRequest::send(JSC::ExecState& state, std::optional<SendTypes>&& sendType)
     429ExceptionOr<void> XMLHttpRequest::send(std::optional<SendTypes>&& sendType)
    477430{
    478431    InspectorInstrumentation::willSendXMLHttpRequest(scriptExecutionContext(), url());
     
    492445    }
    493446
    494     SendFunctor functor;
    495     state.iterate(functor);
    496     setLastSendLineAndColumnNumber(functor.line(), functor.column());
    497     setLastSendURL(functor.url());
    498 
    499447    return result;
    500448}
     
    993941    if (!m_binaryResponseBuilder)
    994942        decodedText = m_responseBuilder.toStringPreserveCapacity();
    995     InspectorInstrumentation::didFinishXHRLoading(scriptExecutionContext(), identifier, decodedText, m_url, m_lastSendURL, m_lastSendLineNumber, m_lastSendColumnNumber);
     943    InspectorInstrumentation::didFinishXHRLoading(scriptExecutionContext(), identifier, decodedText);
    996944
    997945    bool hadLoader = m_loader;
  • trunk/Source/WebCore/xml/XMLHttpRequest.h

    r223836 r223868  
    3636class ArrayBuffer;
    3737class ArrayBufferView;
    38 class ExecState;
    3938}
    4039
     
    8180    ExceptionOr<void> open(const String& method, const URL&, bool async);
    8281    ExceptionOr<void> open(const String& method, const String&, bool async, const String& user, const String& password);
    83     ExceptionOr<void> send(JSC::ExecState&, std::optional<SendTypes>&&);
     82    ExceptionOr<void> send(std::optional<SendTypes>&&);
    8483    void abort();
    8584    ExceptionOr<void> setRequestHeader(const String& name, const String& value);
     
    110109    String responseURL() const;
    111110
    112     void setLastSendLineAndColumnNumber(unsigned lineNumber, unsigned columnNumber);
    113     void setLastSendURL(const String& url) { m_lastSendURL = url; }
    114 
    115111    XMLHttpRequestUpload* upload();
    116112    XMLHttpRequestUpload* optionalUpload() const { return m_upload.get(); }
     
    219215    long long m_receivedLength { 0 };
    220216
    221     unsigned m_lastSendLineNumber { 0 };
    222     unsigned m_lastSendColumnNumber { 0 };
    223     String m_lastSendURL;
    224217    std::optional<ExceptionCode> m_exceptionCode;
    225218
  • trunk/Source/WebCore/xml/XMLHttpRequest.idl

    r223836 r223868  
    6767    attribute boolean withCredentials;
    6868    readonly attribute XMLHttpRequestUpload upload;
    69     [CallWith=ScriptState, MayThrowException] void send(optional (Document or BodyInit)? body = null);
     69    [MayThrowException] void send(optional (Document or BodyInit)? body = null);
    7070    void abort();
    7171
Note: See TracChangeset for help on using the changeset viewer.