Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Web Inspector: Clean up InspectorInstrumentation includes
https://bugs.webkit.org/show_bug.cgi?id=150523

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-10-23
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/agents/InspectorConsoleAgent.cpp:
(Inspector::InspectorConsoleAgent::consoleMessageArgumentCounts): Deleted.
* inspector/agents/InspectorConsoleAgent.h:

Source/WebCore:

* Modules/webdatabase/DatabaseManager.cpp:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/MediaQueryEvaluator.cpp:
* dom/EventDispatcher.cpp:
* dom/ExtensionStyleSheets.cpp:
* inspector/InspectorController.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
* inspector/InspectorDatabaseInstrumentation.h: Removed.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didOpenDatabase):
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::toProtocol): Deleted.
* loader/ResourceLoadScheduler.cpp:
* loader/mac/ResourceLoaderMac.mm:
* page/Screen.cpp:
* rendering/TextAutosizer.cpp:
* testing/Internals.cpp:
(WebCore::Internals::consoleMessageArgumentCounts): Deleted.
* testing/Internals.h:
* testing/Internals.idl:
* workers/AbstractWorker.cpp:

Canonical link: https://commits.webkit.org/168678@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
JosephPecoraro authored and webkit-commit-queue committed Oct 24, 2015
1 parent 821f4a5 commit c9e27a1
Show file tree
Hide file tree
Showing 25 changed files with 53 additions and 119 deletions.
11 changes: 11 additions & 0 deletions Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
2015-10-23 Joseph Pecoraro <pecoraro@apple.com>

Web Inspector: Clean up InspectorInstrumentation includes
https://bugs.webkit.org/show_bug.cgi?id=150523

Reviewed by Timothy Hatcher.

* inspector/agents/InspectorConsoleAgent.cpp:
(Inspector::InspectorConsoleAgent::consoleMessageArgumentCounts): Deleted.
* inspector/agents/InspectorConsoleAgent.h:

2015-10-23 Michael Saboff <msaboff@apple.com>

REGRESSION (r179357-r179359): WebContent Crash using AOL Mail @ com.apple.JavascriptCore JSC::linkPolymorphicCall(JSC::ExecState*, JSC::CallLinkInfo&, JSC::CallVariant, JSC::RegisterPreservationMode) + 1584
Expand Down
Expand Up @@ -124,14 +124,6 @@ void InspectorConsoleAgent::addMessageToConsole(std::unique_ptr<ConsoleMessage>
addConsoleMessage(WTF::move(message));
}

Vector<unsigned> InspectorConsoleAgent::consoleMessageArgumentCounts() const
{
Vector<unsigned> result(m_consoleMessages.size());
for (size_t i = 0; i < m_consoleMessages.size(); i++)
result[i] = m_consoleMessages[i]->argumentCount();
return result;
}

void InspectorConsoleAgent::startTiming(const String& title)
{
// Follow Firebug's behavior of requiring a title that is not null or
Expand Down
Expand Up @@ -71,8 +71,6 @@ class JS_EXPORT_PRIVATE InspectorConsoleAgent : public InspectorAgentBase, publi

void addMessageToConsole(std::unique_ptr<ConsoleMessage>);

Vector<unsigned> consoleMessageArgumentCounts() const;

void startTiming(const String& title);
void stopTiming(const String& title, PassRefPtr<ScriptCallStack>);
void count(JSC::ExecState*, PassRefPtr<ScriptArguments>);
Expand Down
32 changes: 32 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,35 @@
2015-10-23 Joseph Pecoraro <pecoraro@apple.com>

Web Inspector: Clean up InspectorInstrumentation includes
https://bugs.webkit.org/show_bug.cgi?id=150523

Reviewed by Timothy Hatcher.

* Modules/webdatabase/DatabaseManager.cpp:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/MediaQueryEvaluator.cpp:
* dom/EventDispatcher.cpp:
* dom/ExtensionStyleSheets.cpp:
* inspector/InspectorController.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
* inspector/InspectorDatabaseInstrumentation.h: Removed.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didOpenDatabase):
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::toProtocol): Deleted.
* loader/ResourceLoadScheduler.cpp:
* loader/mac/ResourceLoaderMac.mm:
* page/Screen.cpp:
* rendering/TextAutosizer.cpp:
* testing/Internals.cpp:
(WebCore::Internals::consoleMessageArgumentCounts): Deleted.
* testing/Internals.h:
* testing/Internals.idl:
* workers/AbstractWorker.cpp:

2015-10-23 Simon Fraser <simon.fraser@apple.com>

Avoid SVG-induced layouts inside Element::absoluteEventBounds()
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/Modules/webdatabase/DatabaseManager.cpp
Expand Up @@ -33,7 +33,7 @@
#include "DatabaseServer.h"
#include "DatabaseTask.h"
#include "ExceptionCode.h"
#include "InspectorDatabaseInstrumentation.h"
#include "InspectorInstrumentation.h"
#include "Logging.h"
#include "PlatformStrategies.h"
#include "ScriptController.h"
Expand Down
1 change: 0 additions & 1 deletion Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Expand Up @@ -22842,7 +22842,6 @@
<ClInclude Include="..\inspector\InspectorController.h" />
<ClInclude Include="..\inspector\InspectorCSSAgent.h" />
<ClInclude Include="..\inspector\InspectorDatabaseAgent.h" />
<ClInclude Include="..\inspector\InspectorDatabaseInstrumentation.h" />
<ClInclude Include="..\inspector\InspectorDatabaseResource.h" />
<ClInclude Include="..\inspector\InspectorDOMAgent.h" />
<ClInclude Include="..\inspector\InspectorDOMDebuggerAgent.h" />
Expand Down
3 changes: 0 additions & 3 deletions Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Expand Up @@ -11929,9 +11929,6 @@
<ClInclude Include="..\inspector\InspectorDatabaseAgent.h">
<Filter>inspector</Filter>
</ClInclude>
<ClInclude Include="..\inspector\InspectorDatabaseInstrumentation.h">
<Filter>inspector</Filter>
</ClInclude>
<ClInclude Include="..\inspector\InspectorDatabaseResource.h">
<Filter>inspector</Filter>
</ClInclude>
Expand Down
4 changes: 0 additions & 4 deletions Source/WebCore/WebCore.xcodeproj/project.pbxproj
Expand Up @@ -6576,7 +6576,6 @@
F3D4C47812E07663003DA150 /* InspectorDOMDebuggerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F3D4C47612E07663003DA150 /* InspectorDOMDebuggerAgent.cpp */; };
F3D4C47912E07663003DA150 /* InspectorDOMDebuggerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = F3D4C47712E07663003DA150 /* InspectorDOMDebuggerAgent.h */; };
F3F5CF1112ED81A80084C569 /* InspectorConsoleInstrumentation.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F5CF1012ED81A80084C569 /* InspectorConsoleInstrumentation.h */; };
F3F5CF1312ED81B30084C569 /* InspectorDatabaseInstrumentation.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F5CF1212ED81B30084C569 /* InspectorDatabaseInstrumentation.h */; };
F40EA8AB1B867E4400CE5581 /* NSScrollingInputFilterSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = F40EA8AA1B867D6500CE5581 /* NSScrollingInputFilterSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
F42FFB461984B71600F6837F /* LengthRepeat.h in Headers */ = {isa = PBXBuildFile; fileRef = F42FFB451984B71600F6837F /* LengthRepeat.h */; };
F45C231D1995B73B00A6E2E3 /* AxisScrollSnapOffsets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F45C231B1995B73B00A6E2E3 /* AxisScrollSnapOffsets.cpp */; };
Expand Down Expand Up @@ -14459,7 +14458,6 @@
F3D4C47612E07663003DA150 /* InspectorDOMDebuggerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDOMDebuggerAgent.cpp; sourceTree = "<group>"; };
F3D4C47712E07663003DA150 /* InspectorDOMDebuggerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDOMDebuggerAgent.h; sourceTree = "<group>"; };
F3F5CF1012ED81A80084C569 /* InspectorConsoleInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorConsoleInstrumentation.h; sourceTree = "<group>"; };
F3F5CF1212ED81B30084C569 /* InspectorDatabaseInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDatabaseInstrumentation.h; sourceTree = "<group>"; };
F40EA8AA1B867D6500CE5581 /* NSScrollingInputFilterSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSScrollingInputFilterSPI.h; sourceTree = "<group>"; };
F42FFB451984B71600F6837F /* LengthRepeat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LengthRepeat.h; sourceTree = "<group>"; };
F45C231B1995B73B00A6E2E3 /* AxisScrollSnapOffsets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AxisScrollSnapOffsets.cpp; sourceTree = "<group>"; };
Expand Down Expand Up @@ -15913,7 +15911,6 @@
82AB1742124B99EC00C5069D /* InspectorCSSAgent.h */,
7AB0B1BE1211A62200A76940 /* InspectorDatabaseAgent.cpp */,
7AB0B1BF1211A62200A76940 /* InspectorDatabaseAgent.h */,
F3F5CF1212ED81B30084C569 /* InspectorDatabaseInstrumentation.h */,
41F062130F5F192600A07EAC /* InspectorDatabaseResource.cpp */,
41F062120F5F192600A07EAC /* InspectorDatabaseResource.h */,
7A2458791021EAF4000A00AA /* InspectorDOMAgent.cpp */,
Expand Down Expand Up @@ -25821,7 +25818,6 @@
82AB1744124B99EC00C5069D /* InspectorCSSAgent.h in Headers */,
4A9CC82116BF9BB400EC645A /* InspectorCSSOMWrappers.h in Headers */,
7AB0B1C11211A62200A76940 /* InspectorDatabaseAgent.h in Headers */,
F3F5CF1312ED81B30084C569 /* InspectorDatabaseInstrumentation.h in Headers */,
41F062140F5F192600A07EAC /* InspectorDatabaseResource.h in Headers */,
7A24587C1021EAF4000A00AA /* InspectorDOMAgent.h in Headers */,
F3D4C47912E07663003DA150 /* InspectorDOMDebuggerAgent.h in Headers */,
Expand Down
4 changes: 0 additions & 4 deletions Source/WebCore/css/MediaQueryEvaluator.cpp
Expand Up @@ -34,12 +34,8 @@
#include "CSSToLengthConversionData.h"
#include "CSSValueKeywords.h"
#include "CSSValueList.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "DOMWindow.h"
#include "FloatRect.h"
#include "FrameView.h"
#include "InspectorInstrumentation.h"
#include "IntRect.h"
#include "MainFrame.h"
#include "MediaFeatureNames.h"
Expand Down
1 change: 0 additions & 1 deletion Source/WebCore/dom/EventDispatcher.cpp
Expand Up @@ -32,7 +32,6 @@
#include "HTMLInputElement.h"
#include "HTMLMediaElement.h"
#include "HTMLSlotElement.h"
#include "InspectorInstrumentation.h"
#include "MouseEvent.h"
#include "PseudoElement.h"
#include "ScopedEventQueue.h"
Expand Down
1 change: 0 additions & 1 deletion Source/WebCore/dom/ExtensionStyleSheets.cpp
Expand Up @@ -33,7 +33,6 @@
#include "HTMLIFrameElement.h"
#include "HTMLLinkElement.h"
#include "HTMLStyleElement.h"
#include "InspectorInstrumentation.h"
#include "Page.h"
#include "PageGroup.h"
#include "ProcessingInstruction.h"
Expand Down
3 changes: 0 additions & 3 deletions Source/WebCore/inspector/InspectorController.h
Expand Up @@ -32,7 +32,6 @@
#ifndef InspectorController_h
#define InspectorController_h

#include "InspectorInstrumentationCookie.h"
#include "InspectorOverlay.h"
#include <inspector/InspectorAgentRegistry.h>
#include <inspector/InspectorEnvironment.h>
Expand Down Expand Up @@ -72,7 +71,6 @@ class InspectorTimelineAgent;
class InstrumentingAgents;
class Node;
class Page;
class PageDebuggerAgent;
class WebInjectedScriptManager;

class InspectorController final : public Inspector::InspectorEnvironment {
Expand Down Expand Up @@ -157,7 +155,6 @@ class InspectorController final : public Inspector::InspectorEnvironment {
InspectorDOMDebuggerAgent* m_domDebuggerAgent { nullptr };
InspectorTimelineAgent* m_timelineAgent { nullptr };

Vector<InspectorInstrumentationCookie, 2> m_injectedScriptInstrumentationCookies;
bool m_isUnderTest { false };
bool m_isAutomaticInspection { false };
};
Expand Down
1 change: 0 additions & 1 deletion Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp
Expand Up @@ -34,7 +34,6 @@

#include "HTMLElement.h"
#include "InspectorDOMAgent.h"
#include "InspectorInstrumentation.h"
#include "InstrumentingAgents.h"
#include <inspector/InspectorFrontendDispatchers.h>
#include <inspector/InspectorValues.h>
Expand Down
47 changes: 0 additions & 47 deletions Source/WebCore/inspector/InspectorDatabaseInstrumentation.h

This file was deleted.

7 changes: 7 additions & 0 deletions Source/WebCore/inspector/InspectorInstrumentation.h
Expand Up @@ -1128,6 +1128,13 @@ inline void InspectorInstrumentation::didWriteHTML(const InspectorInstrumentatio
didWriteHTMLImpl(cookie, endLine);
}

inline void InspectorInstrumentation::didOpenDatabase(ScriptExecutionContext* context, RefPtr<Database>&& database, const String& domain, const String& name, const String& version)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
didOpenDatabaseImpl(*instrumentingAgents, WTF::move(database), domain, name, version);
}

inline void InspectorInstrumentation::didDispatchDOMStorageEvent(const String& key, const String& oldValue, const String& newValue, StorageType storageType, SecurityOrigin* securityOrigin, Page* page)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
Expand Down
1 change: 0 additions & 1 deletion Source/WebCore/inspector/InspectorPageAgent.cpp
Expand Up @@ -55,7 +55,6 @@
#include "ImageBuffer.h"
#include "InspectorClient.h"
#include "InspectorDOMAgent.h"
#include "InspectorInstrumentation.h"
#include "InspectorOverlay.h"
#include "InspectorTimelineAgent.h"
#include "InstrumentingAgents.h"
Expand Down
1 change: 0 additions & 1 deletion Source/WebCore/inspector/InspectorTimelineAgent.cpp
Expand Up @@ -36,7 +36,6 @@
#include "Event.h"
#include "Frame.h"
#include "FrameView.h"
#include "InspectorInstrumentation.h"
#include "InspectorPageAgent.h"
#include "InstrumentingAgents.h"
#include "IntRect.h"
Expand Down
3 changes: 1 addition & 2 deletions Source/WebCore/loader/ResourceLoadScheduler.cpp
Expand Up @@ -29,15 +29,14 @@
#include "DocumentLoader.h"
#include "Frame.h"
#include "FrameLoader.h"
#include "InspectorInstrumentation.h"
#include "URL.h"
#include "LoaderStrategy.h"
#include "Logging.h"
#include "NetscapePlugInStreamLoader.h"
#include "PlatformStrategies.h"
#include "ResourceLoader.h"
#include "ResourceRequest.h"
#include "SubresourceLoader.h"
#include "URL.h"
#include <wtf/MainThread.h>
#include <wtf/TemporaryChange.h>
#include <wtf/text/CString.h>
Expand Down
4 changes: 0 additions & 4 deletions Source/WebCore/loader/mac/ResourceLoaderMac.mm
Expand Up @@ -34,10 +34,6 @@
#include "FrameLoaderClient.h"
#include "SharedBuffer.h"

#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
#include "InspectorInstrumentation.h"
#endif

namespace WebCore {

#if USE(CFNETWORK)
Expand Down
4 changes: 0 additions & 4 deletions Source/WebCore/page/Screen.cpp
Expand Up @@ -26,17 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/


#include "config.h"
#include "Screen.h"

#include "FloatRect.h"
#include "Frame.h"
#include "FrameView.h"
#include "InspectorInstrumentation.h"
#include "PlatformScreen.h"
#include "Settings.h"
#include "Widget.h"

namespace WebCore {

Expand Down
2 changes: 0 additions & 2 deletions Source/WebCore/rendering/TextAutosizer.cpp
Expand Up @@ -26,15 +26,13 @@

#include "Document.h"
#include "HTMLElement.h"
#include "InspectorInstrumentation.h"
#include "IntSize.h"
#include "RenderObject.h"
#include "RenderStyle.h"
#include "RenderText.h"
#include "RenderView.h"
#include "Settings.h"
#include "StyleInheritedData.h"

#include <algorithm>
#include <wtf/StdLibExtras.h>
#include <wtf/Vector.h>
Expand Down
24 changes: 1 addition & 23 deletions Source/WebCore/testing/Internals.cpp
Expand Up @@ -66,11 +66,11 @@
#include "HTMLVideoElement.h"
#include "HistoryController.h"
#include "HistoryItem.h"
#include "HitTestResult.h"
#include "IconController.h"
#include "InspectorClient.h"
#include "InspectorController.h"
#include "InspectorFrontendClientLocal.h"
#include "InspectorInstrumentation.h"
#include "InspectorOverlay.h"
#include "InstrumentingAgents.h"
#include "IntRect.h"
Expand Down Expand Up @@ -114,7 +114,6 @@
#include "TypeConversions.h"
#include "UserMediaController.h"
#include "ViewportArguments.h"
#include "WebConsoleAgent.h"
#include "WorkerThread.h"
#include "XMLHttpRequest.h"
#include <JavaScriptCore/Profile.h>
Expand Down Expand Up @@ -1777,27 +1776,6 @@ unsigned Internals::numberOfLiveDocuments() const
return Document::allDocuments().size();
}

Vector<String> Internals::consoleMessageArgumentCounts() const
{
Document* document = contextDocument();
if (!document || !document->page())
return Vector<String>();

InstrumentingAgents* instrumentingAgents = InspectorInstrumentation::instrumentingAgentsForPage(document->page());
if (!instrumentingAgents)
return Vector<String>();

InspectorConsoleAgent* consoleAgent = instrumentingAgents->webConsoleAgent();
if (!consoleAgent)
return Vector<String>();

Vector<unsigned> counts = consoleAgent->consoleMessageArgumentCounts();
Vector<String> result(counts.size());
for (size_t i = 0; i < counts.size(); i++)
result[i] = String::number(counts[i]);
return result;
}

RefPtr<DOMWindow> Internals::openDummyInspectorFrontend(const String& url)
{
Page* inspectedPage = contextDocument()->frame()->page();
Expand Down
1 change: 0 additions & 1 deletion Source/WebCore/testing/Internals.h
Expand Up @@ -263,7 +263,6 @@ class Internals : public RefCounted<Internals>
unsigned numberOfLiveNodes() const;
unsigned numberOfLiveDocuments() const;

Vector<String> consoleMessageArgumentCounts() const;
RefPtr<DOMWindow> openDummyInspectorFrontend(const String& url);
void closeDummyInspectorFrontend();
void setJavaScriptProfilingEnabled(bool enabled, ExceptionCode&);
Expand Down
1 change: 0 additions & 1 deletion Source/WebCore/testing/Internals.idl
Expand Up @@ -246,7 +246,6 @@ enum MediaControlEvent {

unsigned long numberOfLiveNodes();
unsigned long numberOfLiveDocuments();
sequence<DOMString> consoleMessageArgumentCounts();
DOMWindow openDummyInspectorFrontend(DOMString url);
void closeDummyInspectorFrontend();
[RaisesException] void setJavaScriptProfilingEnabled(boolean creates);
Expand Down

0 comments on commit c9e27a1

Please sign in to comment.