| Differences between
and this patch
- a/Source/WebCore/ChangeLog +59 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2013-02-04  Andrey Kosyakov  <caseq@chromium.org>
2
3
        Web Inspector: plumb trace events to Timeline agent
4
        https://bugs.webkit.org/show_bug.cgi?id=105796
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        - plumb trace events to Timeline;
9
        - add TimelineTraceEventProcessor to process selected trace events;
10
        - emit timeline events from TimelineTraceEventProcessor.
11
12
        Note that actual event processing logic is a separate change.
13
14
        * CMakeLists.txt:
15
        * GNUmakefile.list.am:
16
        * Target.pri:
17
        * WebCore.gypi:
18
        * WebCore.vcproj/WebCore.vcproj:
19
        * WebCore.xcodeproj/project.pbxproj:
20
        * inspector/InspectorAllInOne.cpp:
21
        * inspector/InspectorClient.h:
22
        (InspectorClient):
23
        (WebCore::InspectorClient::setTraceEventCallback):
24
        * inspector/InspectorTimelineAgent.cpp:
25
        (WebCore::InspectorTimelineAgent::start):
26
        (WebCore::InspectorTimelineAgent::stop):
27
        (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
28
        (WebCore::InspectorTimelineAgent::page):
29
        (WebCore):
30
        * inspector/InspectorTimelineAgent.h:
31
        (WebCore):
32
        (InspectorTimelineAgent):
33
        * inspector/TimelineTraceEventProcessor.cpp: Added.
34
        (WebCore::TimelineTraceEventProcessor::TimelineTraceEventProcessor):
35
        (WebCore):
36
        (WebCore::TimelineTraceEventProcessor::~TimelineTraceEventProcessor):
37
        (WebCore::TimelineTraceEventProcessor::TraceEvent::parameter):
38
        (WebCore::TimelineTraceEventProcessor::processEventOnAnyThread):
39
        (WebCore::TimelineTraceEventProcessor::processEvent):
40
        (WebCore::TimelineTraceEventProcessor::sendTimelineRecord):
41
        (WebCore::TimelineTraceEventProcessor::processBackgroundEvents):
42
        * inspector/TimelineTraceEventProcessor.h: Added.
43
        (WebCore):
44
        (TimelineTraceEventProcessor):
45
        (TraceEvent):
46
        (WebCore::TimelineTraceEventProcessor::TraceEvent::TraceEvent):
47
        (WebCore::TimelineTraceEventProcessor::TraceEvent::timestamp):
48
        (WebCore::TimelineTraceEventProcessor::TraceEvent::phase):
49
        (WebCore::TimelineTraceEventProcessor::TraceEvent::name):
50
        (WebCore::TimelineTraceEventProcessor::TraceEvent::threadIdentifier):
51
        (WebCore::TimelineTraceEventProcessor::TraceEvent::argumentCount):
52
        (WebCore::TimelineTraceEventProcessor::TraceEvent::asBool):
53
        (WebCore::TimelineTraceEventProcessor::TraceEvent::asInt):
54
        (WebCore::TimelineTraceEventProcessor::TraceEvent::asUInt):
55
        (WebCore::TimelineTraceEventProcessor::TraceEvent::asDouble):
56
        (WebCore::TimelineTraceEventProcessor::TraceEvent::asString):
57
        (WebCore::TimelineTraceEventProcessor::EventTypeEntry::EventTypeEntry):
58
        (EventTypeEntry):
59
1
2013-02-04  Eugene Klyuchnikov  <eustas@chromium.org>
60
2013-02-04  Eugene Klyuchnikov  <eustas@chromium.org>
2
61
3
        Web Inspector: [Network] Minor refactorings.
62
        Web Inspector: [Network] Minor refactorings.
- a/Source/WebKit/chromium/ChangeLog +23 lines
Lines 1-3 a/Source/WebKit/chromium/ChangeLog_sec1
1
2013-02-04  Andrey Kosyakov  <caseq@chromium.org>
2
3
        Web Inspector: plumb trace events to Timeline agent
4
        https://bugs.webkit.org/show_bug.cgi?id=105796
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Plumb trace events to Inspector.
9
10
        * public/WebDevToolsAgentClient.h:
11
        (WebDevToolsAgentClient):
12
        (WebKit::WebDevToolsAgentClient::setTraceEventCallback):
13
        * src/InspectorClientImpl.cpp:
14
        (WebKit::InspectorClientImpl::setTraceEventCallback):
15
        (WebKit):
16
        * src/InspectorClientImpl.h:
17
        (InspectorClientImpl):
18
        * src/WebDevToolsAgentImpl.cpp:
19
        (WebKit::WebDevToolsAgentImpl::setTraceEventCallback):
20
        (WebKit):
21
        * src/WebDevToolsAgentImpl.h:
22
        (WebDevToolsAgentImpl):
23
1
2013-02-03  KwangYong Choi  <ky0.choi@samsung.com>
24
2013-02-03  KwangYong Choi  <ky0.choi@samsung.com>
2
25
3
        Fix build warning after r141473
26
        Fix build warning after r141473
- a/Source/WebCore/CMakeLists.txt +1 lines
Lines 1655-1660 set(WebCore_SOURCES a/Source/WebCore/CMakeLists.txt_sec1
1655
    inspector/ScriptCallFrame.cpp
1655
    inspector/ScriptCallFrame.cpp
1656
    inspector/ScriptCallStack.cpp
1656
    inspector/ScriptCallStack.cpp
1657
    inspector/TimelineRecordFactory.cpp
1657
    inspector/TimelineRecordFactory.cpp
1658
    inspector/TimelineTraceEventProcessor.cpp
1658
    inspector/WorkerConsoleAgent.cpp
1659
    inspector/WorkerConsoleAgent.cpp
1659
    inspector/WorkerDebuggerAgent.cpp
1660
    inspector/WorkerDebuggerAgent.cpp
1660
    inspector/WorkerInspectorController.cpp
1661
    inspector/WorkerInspectorController.cpp
- a/Source/WebCore/GNUmakefile.list.am +2 lines
Lines 3867-3872 webcore_sources += \ a/Source/WebCore/GNUmakefile.list.am_sec1
3867
	Source/WebCore/inspector/ScriptGCEventListener.h \
3867
	Source/WebCore/inspector/ScriptGCEventListener.h \
3868
	Source/WebCore/inspector/TimelineRecordFactory.cpp \
3868
	Source/WebCore/inspector/TimelineRecordFactory.cpp \
3869
	Source/WebCore/inspector/TimelineRecordFactory.h \
3869
	Source/WebCore/inspector/TimelineRecordFactory.h \
3870
	Source/WebCore/inspector/TimelineTraceEventProcessor.cpp \
3871
	Source/WebCore/inspector/TimelineTraceEventProcessor.h \
3870
	Source/WebCore/inspector/WorkerConsoleAgent.cpp \
3872
	Source/WebCore/inspector/WorkerConsoleAgent.cpp \
3871
	Source/WebCore/inspector/WorkerConsoleAgent.h \
3873
	Source/WebCore/inspector/WorkerConsoleAgent.h \
3872
	Source/WebCore/inspector/WorkerDebuggerAgent.cpp \
3874
	Source/WebCore/inspector/WorkerDebuggerAgent.cpp \
- a/Source/WebCore/Target.pri +1 lines
Lines 813-818 SOURCES += \ a/Source/WebCore/Target.pri_sec1
813
    inspector/ScriptCallFrame.cpp \
813
    inspector/ScriptCallFrame.cpp \
814
    inspector/ScriptCallStack.cpp \
814
    inspector/ScriptCallStack.cpp \
815
    inspector/TimelineRecordFactory.cpp \
815
    inspector/TimelineRecordFactory.cpp \
816
    inspector/TimelineTraceEventProcessor.cpp \
816
    inspector/WorkerConsoleAgent.cpp \
817
    inspector/WorkerConsoleAgent.cpp \
817
    inspector/WorkerDebuggerAgent.cpp \
818
    inspector/WorkerDebuggerAgent.cpp \
818
    inspector/WorkerInspectorController.cpp \
819
    inspector/WorkerInspectorController.cpp \
- a/Source/WebCore/WebCore.gypi +2 lines
Lines 1913-1918 a/Source/WebCore/WebCore.gypi_sec1
1913
            'inspector/ScriptGCEventListener.h',
1913
            'inspector/ScriptGCEventListener.h',
1914
            'inspector/TimelineRecordFactory.cpp',
1914
            'inspector/TimelineRecordFactory.cpp',
1915
            'inspector/TimelineRecordFactory.h',
1915
            'inspector/TimelineRecordFactory.h',
1916
            'inspector/TimelineTraceEventProcessor.cpp',
1917
            'inspector/TimelineTraceEventProcessor.h',
1916
            'inspector/WorkerConsoleAgent.cpp',
1918
            'inspector/WorkerConsoleAgent.cpp',
1917
            'inspector/WorkerConsoleAgent.h',
1919
            'inspector/WorkerConsoleAgent.h',
1918
            'inspector/WorkerDebuggerAgent.cpp',
1920
            'inspector/WorkerDebuggerAgent.cpp',
- a/Source/WebCore/WebCore.vcproj/WebCore.vcproj +24 lines
Lines 76654-76659 a/Source/WebCore/WebCore.vcproj/WebCore.vcproj_sec1
76654
				RelativePath="..\inspector\TimelineRecordFactory.h"
76654
				RelativePath="..\inspector\TimelineRecordFactory.h"
76655
				>
76655
				>
76656
			</File>
76656
			</File>
76657
                        <File
76658
                                RelativePath="..\inspector\TimelineTraceEventProcessor.cpp"
76659
                                >
76660
                                <FileConfiguration
76661
                                        Name="Release|Win32"
76662
                                        ExcludedFromBuild="true"
76663
                                        >
76664
                                        <Tool
76665
                                                Name="VCCLCompilerTool"
76666
                                        />
76667
                                </FileConfiguration>
76668
                                <FileConfiguration
76669
                                        Name="Production|Win32"
76670
                                        ExcludedFromBuild="true"
76671
                                        >
76672
                                        <Tool
76673
                                                Name="VCCLCompilerTool"
76674
                                        />
76675
                                </FileConfiguration>
76676
                        </File>
76677
                        <File
76678
                                RelativePath="..\inspector\TimelineTraceEventProcessor.h"
76679
                                >
76680
                        </File>
76657
			<File
76681
			<File
76658
				RelativePath="..\inspector\WorkerConsoleAgent.cpp"
76682
				RelativePath="..\inspector\WorkerConsoleAgent.cpp"
76659
				>
76683
				>
- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj +8 lines
Lines 1275-1280 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec1
1275
		46F9D5DF0B0D60170028EE36 /* progressCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DC0B0D60170028EE36 /* progressCursor.png */; };
1275
		46F9D5DF0B0D60170028EE36 /* progressCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DC0B0D60170028EE36 /* progressCursor.png */; };
1276
		490707E61219C04300D90E51 /* ANGLEWebKitBridge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */; };
1276
		490707E61219C04300D90E51 /* ANGLEWebKitBridge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */; };
1277
		490707E71219C04300D90E51 /* ANGLEWebKitBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */; };
1277
		490707E71219C04300D90E51 /* ANGLEWebKitBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */; };
1278
		49140256168E02E8002D6C6A /* TimelineTraceEventProcessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49140254168E02B4002D6C6A /* TimelineTraceEventProcessor.cpp */; };
1279
		49140257168E02EC002D6C6A /* TimelineTraceEventProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 49140255168E02B4002D6C6A /* TimelineTraceEventProcessor.h */; };
1278
		49182B5215DCE6F000548418 /* PlatformInstrumentation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49182B5015DCE6F000548418 /* PlatformInstrumentation.cpp */; };
1280
		49182B5215DCE6F000548418 /* PlatformInstrumentation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49182B5015DCE6F000548418 /* PlatformInstrumentation.cpp */; };
1279
		49182B5315DCE6F000548418 /* PlatformInstrumentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49182B5115DCE6F000548418 /* PlatformInstrumentation.h */; };
1281
		49182B5315DCE6F000548418 /* PlatformInstrumentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49182B5115DCE6F000548418 /* PlatformInstrumentation.h */; };
1280
		492863991253B8FC00F792D6 /* ResourceLoadInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 492863981253B8FC00F792D6 /* ResourceLoadInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
1282
		492863991253B8FC00F792D6 /* ResourceLoadInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 492863981253B8FC00F792D6 /* ResourceLoadInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
Lines 8623-8628 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec2
8623
		46F9D5DC0B0D60170028EE36 /* progressCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = progressCursor.png; sourceTree = "<group>"; };
8625
		46F9D5DC0B0D60170028EE36 /* progressCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = progressCursor.png; sourceTree = "<group>"; };
8624
		490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ANGLEWebKitBridge.cpp; sourceTree = "<group>"; };
8626
		490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ANGLEWebKitBridge.cpp; sourceTree = "<group>"; };
8625
		490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANGLEWebKitBridge.h; sourceTree = "<group>"; };
8627
		490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANGLEWebKitBridge.h; sourceTree = "<group>"; };
8628
		49140254168E02B4002D6C6A /* TimelineTraceEventProcessor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimelineTraceEventProcessor.cpp; sourceTree = "<group>"; };
8629
		49140255168E02B4002D6C6A /* TimelineTraceEventProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimelineTraceEventProcessor.h; sourceTree = "<group>"; };
8626
		49182B5015DCE6F000548418 /* PlatformInstrumentation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformInstrumentation.cpp; sourceTree = "<group>"; };
8630
		49182B5015DCE6F000548418 /* PlatformInstrumentation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformInstrumentation.cpp; sourceTree = "<group>"; };
8627
		49182B5115DCE6F000548418 /* PlatformInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformInstrumentation.h; sourceTree = "<group>"; };
8631
		49182B5115DCE6F000548418 /* PlatformInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformInstrumentation.h; sourceTree = "<group>"; };
8628
		492863981253B8FC00F792D6 /* ResourceLoadInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoadInfo.h; sourceTree = "<group>"; };
8632
		492863981253B8FC00F792D6 /* ResourceLoadInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoadInfo.h; sourceTree = "<group>"; };
Lines 15193-15198 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec3
15193
				9FA37EF01172FD4100C4CD55 /* ScriptProfileNode.idl */,
15197
				9FA37EF01172FD4100C4CD55 /* ScriptProfileNode.idl */,
15194
				7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */,
15198
				7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */,
15195
				7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */,
15199
				7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */,
15200
				49140254168E02B4002D6C6A /* TimelineTraceEventProcessor.cpp */,
15201
				49140255168E02B4002D6C6A /* TimelineTraceEventProcessor.h */,
15196
				F382088E147D35F90010BC06 /* WorkerConsoleAgent.cpp */,
15202
				F382088E147D35F90010BC06 /* WorkerConsoleAgent.cpp */,
15197
				F382088F147D35F90010BC06 /* WorkerConsoleAgent.h */,
15203
				F382088F147D35F90010BC06 /* WorkerConsoleAgent.h */,
15198
				F34742DE1343631F00531BC2 /* WorkerDebuggerAgent.cpp */,
15204
				F34742DE1343631F00531BC2 /* WorkerDebuggerAgent.cpp */,
Lines 26339-26344 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec4
26339
				977E2E0F12F0FC9C00C13379 /* XSSAuditor.h in Headers */,
26345
				977E2E0F12F0FC9C00C13379 /* XSSAuditor.h in Headers */,
26340
				977E2E0F12F0FC9C00C13380 /* XSSAuditorDelegate.h in Headers */,
26346
				977E2E0F12F0FC9C00C13380 /* XSSAuditorDelegate.h in Headers */,
26341
				FD537353137B651800008DCE /* ZeroPole.h in Headers */,
26347
				FD537353137B651800008DCE /* ZeroPole.h in Headers */,
26348
				49140257168E02EC002D6C6A /* TimelineTraceEventProcessor.h in Headers */,
26342
			);
26349
			);
26343
			runOnlyForDeploymentPostprocessing = 0;
26350
			runOnlyForDeploymentPostprocessing = 0;
26344
		};
26351
		};
Lines 29497-29502 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec5
29497
				977E2E0E12F0FC9C00C13379 /* XSSAuditor.cpp in Sources */,
29504
				977E2E0E12F0FC9C00C13379 /* XSSAuditor.cpp in Sources */,
29498
				977E2E0E12F0FC9C00C13380 /* XSSAuditorDelegate.cpp in Sources */,
29505
				977E2E0E12F0FC9C00C13380 /* XSSAuditorDelegate.cpp in Sources */,
29499
				FD537352137B651800008DCE /* ZeroPole.cpp in Sources */,
29506
				FD537352137B651800008DCE /* ZeroPole.cpp in Sources */,
29507
				49140256168E02E8002D6C6A /* TimelineTraceEventProcessor.cpp in Sources */,
29500
			);
29508
			);
29501
			runOnlyForDeploymentPostprocessing = 0;
29509
			runOnlyForDeploymentPostprocessing = 0;
29502
		};
29510
		};
- a/Source/WebCore/inspector/InspectorAllInOne.cpp +1 lines
Lines 83-88 a/Source/WebCore/inspector/InspectorAllInOne.cpp_sec1
83
#include "ScriptCallFrame.cpp"
83
#include "ScriptCallFrame.cpp"
84
#include "ScriptCallStack.cpp"
84
#include "ScriptCallStack.cpp"
85
#include "TimelineRecordFactory.cpp"
85
#include "TimelineRecordFactory.cpp"
86
#include "TimelineTraceEventProcessor.cpp"
86
#include "WorkerConsoleAgent.cpp"
87
#include "WorkerConsoleAgent.cpp"
87
#include "WorkerDebuggerAgent.cpp"
88
#include "WorkerDebuggerAgent.cpp"
88
#include "WorkerInspectorController.cpp"
89
#include "WorkerInspectorController.cpp"
- a/Source/WebCore/inspector/InspectorClient.h +5 lines
Lines 59-64 public: a/Source/WebCore/inspector/InspectorClient.h_sec1
59
    virtual void clearBrowserCookies() { }
59
    virtual void clearBrowserCookies() { }
60
    virtual bool canMonitorMainThread() { return false; }
60
    virtual bool canMonitorMainThread() { return false; }
61
61
62
    typedef void (*TraceEventCallback)(char phase, const unsigned char*, const char* name, unsigned long long id,
63
        int numArgs, const char* const* argNames, const unsigned char* argTypes, const unsigned long long* argValues,
64
        unsigned char flags);
65
    virtual void setTraceEventCallback(TraceEventCallback) { }
66
62
    virtual bool canOverrideDeviceMetrics() { return false; }
67
    virtual bool canOverrideDeviceMetrics() { return false; }
63
68
64
    virtual void overrideDeviceMetrics(int /*width*/, int /*height*/, float /*fontScaleFactor*/, bool /*fitWindow*/)
69
    virtual void overrideDeviceMetrics(int /*width*/, int /*height*/, float /*fontScaleFactor*/, bool /*fitWindow*/)
- a/Source/WebCore/inspector/InspectorTimelineAgent.cpp -1 / +12 lines
Lines 1-5 a/Source/WebCore/inspector/InspectorTimelineAgent.cpp_sec1
1
/*
1
/*
2
* Copyright (C) 2009 Google Inc. All rights reserved.
2
* Copyright (C) 2013 Google Inc. All rights reserved.
3
*
3
*
4
* Redistribution and use in source and binary forms, with or without
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions are
5
* modification, are permitted provided that the following conditions are
Lines 51-56 a/Source/WebCore/inspector/InspectorTimelineAgent.cpp_sec2
51
#include "ResourceRequest.h"
51
#include "ResourceRequest.h"
52
#include "ResourceResponse.h"
52
#include "ResourceResponse.h"
53
#include "TimelineRecordFactory.h"
53
#include "TimelineRecordFactory.h"
54
#include "TimelineTraceEventProcessor.h"
54
55
55
#include <wtf/CurrentTime.h>
56
#include <wtf/CurrentTime.h>
56
57
Lines 171-176 void InspectorTimelineAgent::start(ErrorString*, const int* maxCallStackDepth) a/Source/WebCore/inspector/InspectorTimelineAgent.cpp_sec3
171
    m_instrumentingAgents->setInspectorTimelineAgent(this);
172
    m_instrumentingAgents->setInspectorTimelineAgent(this);
172
    ScriptGCEvent::addEventListener(this);
173
    ScriptGCEvent::addEventListener(this);
173
    m_state->setBoolean(TimelineAgentState::timelineAgentEnabled, true);
174
    m_state->setBoolean(TimelineAgentState::timelineAgentEnabled, true);
175
    if (m_client && m_pageAgent)
176
        m_traceEventProcessor = adoptRef(new TimelineTraceEventProcessor(m_weakFactory.createWeakPtr(), m_client));
174
}
177
}
175
178
176
void InspectorTimelineAgent::stop(ErrorString*)
179
void InspectorTimelineAgent::stop(ErrorString*)
Lines 178-183 void InspectorTimelineAgent::stop(ErrorString*) a/Source/WebCore/inspector/InspectorTimelineAgent.cpp_sec4
178
    if (!m_state->getBoolean(TimelineAgentState::timelineAgentEnabled))
181
    if (!m_state->getBoolean(TimelineAgentState::timelineAgentEnabled))
179
        return;
182
        return;
180
183
184
    m_traceEventProcessor.clear();
185
    m_weakFactory.revokeAll();
181
    m_instrumentingAgents->setInspectorTimelineAgent(0);
186
    m_instrumentingAgents->setInspectorTimelineAgent(0);
182
    ScriptGCEvent::removeEventListener(this);
187
    ScriptGCEvent::removeEventListener(this);
183
188
Lines 564-569 InspectorTimelineAgent::InspectorTimelineAgent(InstrumentingAgents* instrumentin a/Source/WebCore/inspector/InspectorTimelineAgent.cpp_sec5
564
    , m_platformInstrumentationClientInstalledAtStackDepth(0)
569
    , m_platformInstrumentationClientInstalledAtStackDepth(0)
565
    , m_inspectorType(type)
570
    , m_inspectorType(type)
566
    , m_client(client)
571
    , m_client(client)
572
    , m_weakFactory(this)
567
{
573
{
568
}
574
}
569
575
Lines 624-629 double InspectorTimelineAgent::timestampFromMicroseconds(double microseconds) a/Source/WebCore/inspector/InspectorTimelineAgent.cpp_sec6
624
    return (microseconds + m_timestampOffset) * 1000.0;
630
    return (microseconds + m_timestampOffset) * 1000.0;
625
}
631
}
626
632
633
Page* InspectorTimelineAgent::page()
634
{
635
    return m_pageAgent ? m_pageAgent->page() : 0;
636
}
637
627
} // namespace WebCore
638
} // namespace WebCore
628
639
629
#endif // ENABLE(INSPECTOR)
640
#endif // ENABLE(INSPECTOR)
- a/Source/WebCore/inspector/InspectorTimelineAgent.h +8 lines
Lines 42-47 a/Source/WebCore/inspector/InspectorTimelineAgent.h_sec1
42
#include "ScriptGCEventListener.h"
42
#include "ScriptGCEventListener.h"
43
#include <wtf/PassOwnPtr.h>
43
#include <wtf/PassOwnPtr.h>
44
#include <wtf/Vector.h>
44
#include <wtf/Vector.h>
45
#include <wtf/WeakPtr.h>
45
46
46
namespace WebCore {
47
namespace WebCore {
47
class Event;
48
class Event;
Lines 52-60 class InspectorPageAgent; a/Source/WebCore/inspector/InspectorTimelineAgent.h_sec2
52
class InspectorState;
53
class InspectorState;
53
class InstrumentingAgents;
54
class InstrumentingAgents;
54
class IntRect;
55
class IntRect;
56
class Page;
55
class RenderObject;
57
class RenderObject;
56
class ResourceRequest;
58
class ResourceRequest;
57
class ResourceResponse;
59
class ResourceResponse;
60
class TimelineTraceEventProcessor;
58
61
59
typedef String ErrorString;
62
typedef String ErrorString;
60
63
Lines 166-171 public: a/Source/WebCore/inspector/InspectorTimelineAgent.h_sec3
166
    virtual void didResizeImage() OVERRIDE;
169
    virtual void didResizeImage() OVERRIDE;
167
170
168
private:
171
private:
172
    friend class TimelineTraceEventProcessor;
173
169
    struct TimelineRecordEntry {
174
    struct TimelineRecordEntry {
170
        TimelineRecordEntry(PassRefPtr<InspectorObject> record, PassRefPtr<InspectorObject> data, PassRefPtr<InspectorArray> children, const String& type, const String& frameId, size_t usedHeapSizeAtStart)
175
        TimelineRecordEntry(PassRefPtr<InspectorObject> record, PassRefPtr<InspectorObject> data, PassRefPtr<InspectorArray> children, const String& type, const String& frameId, size_t usedHeapSizeAtStart)
171
            : record(record), data(data), children(children), type(type), frameId(frameId), usedHeapSizeAtStart(usedHeapSizeAtStart)
176
            : record(record), data(data), children(children), type(type), frameId(frameId), usedHeapSizeAtStart(usedHeapSizeAtStart)
Lines 195-200 private: a/Source/WebCore/inspector/InspectorTimelineAgent.h_sec4
195
200
196
    double timestamp();
201
    double timestamp();
197
    double timestampFromMicroseconds(double microseconds);
202
    double timestampFromMicroseconds(double microseconds);
203
    Page* page();
198
204
199
    InspectorPageAgent* m_pageAgent;
205
    InspectorPageAgent* m_pageAgent;
200
206
Lines 220-225 private: a/Source/WebCore/inspector/InspectorTimelineAgent.h_sec5
220
    RefPtr<InspectorObject> m_pendingFrameRecord;
226
    RefPtr<InspectorObject> m_pendingFrameRecord;
221
    InspectorType m_inspectorType;
227
    InspectorType m_inspectorType;
222
    InspectorClient* m_client;
228
    InspectorClient* m_client;
229
    WeakPtrFactory<InspectorTimelineAgent> m_weakFactory;
230
    RefPtr<TimelineTraceEventProcessor> m_traceEventProcessor;
223
};
231
};
224
232
225
} // namespace WebCore
233
} // namespace WebCore
- a/Source/WebCore/inspector/TimelineTraceEventProcessor.cpp +211 lines
Line 0 a/Source/WebCore/inspector/TimelineTraceEventProcessor.cpp_sec1
1
/*
2
* Copyright (C) 2012 Google Inc. All rights reserved.
3
*
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions are
6
* met:
7
*
8
*     * Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
*     * Redistributions in binary form must reproduce the above
11
* copyright notice, this list of conditions and the following disclaimer
12
* in the documentation and/or other materials provided with the
13
* distribution.
14
*     * Neither the name of Google Inc. nor the names of its
15
* contributors may be used to endorse or promote products derived from
16
* this software without specific prior written permission.
17
*
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
*/
30
31
#include "config.h"
32
33
#if ENABLE(INSPECTOR)
34
35
#include "TimelineTraceEventProcessor.h"
36
37
#include "InspectorClient.h"
38
#include "InspectorInstrumentation.h"
39
#include "InspectorTimelineAgent.h"
40
#include "TimelineRecordFactory.h"
41
42
#include <wtf/CurrentTime.h>
43
#include <wtf/MainThread.h>
44
#include <wtf/ThreadSpecific.h>
45
#include <wtf/Vector.h>
46
47
namespace WebCore {
48
49
namespace {
50
51
class TraceEventDispatcher {
52
    WTF_MAKE_NONCOPYABLE(TraceEventDispatcher);
53
public:
54
    static TraceEventDispatcher* instance()
55
    {
56
        DEFINE_STATIC_LOCAL(TraceEventDispatcher, instance, ());
57
        return &instance;
58
    }
59
60
    void addProcessor(TimelineTraceEventProcessor* processor, InspectorClient* client)
61
    {
62
        MutexLocker locker(m_mutex);
63
64
        m_processors.append(processor);
65
        if (m_processors.size() == 1)
66
            client->setTraceEventCallback(dispatchEventOnAnyThread);
67
    }
68
69
    void removeProcessor(TimelineTraceEventProcessor* processor, InspectorClient* client)
70
    {
71
        MutexLocker locker(m_mutex);
72
73
        size_t index = m_processors.find(processor);
74
        if (index == notFound) {
75
            ASSERT_NOT_REACHED();
76
            return;
77
        }
78
        m_processors.remove(index);
79
        if (m_processors.isEmpty())
80
            client->setTraceEventCallback(0);
81
    }
82
83
private:
84
    enum { ProcessorsVectorInlineCapacity = 2 };
85
86
    TraceEventDispatcher() { }
87
88
    static void dispatchEventOnAnyThread(char phase, const unsigned char*, const char* name, unsigned long long id,
89
        int numArgs, const char* const* argNames, const unsigned char* argTypes, const unsigned long long* argValues,
90
        unsigned char flags)
91
    {
92
        TraceEventDispatcher* self = instance();
93
        Vector<RefPtr<TimelineTraceEventProcessor>, ProcessorsVectorInlineCapacity> processors;
94
        {
95
            MutexLocker locker(self->m_mutex);
96
            processors = self->m_processors;
97
        }
98
        for (int i = 0, size = processors.size(); i < size; ++i) {
99
            processors[i]->processEventOnAnyThread(static_cast<TimelineTraceEventProcessor::TraceEventPhase>(phase),
100
                name, id, numArgs, argNames, argTypes, argValues, flags);
101
        }
102
    }
103
104
    Mutex m_mutex;
105
    Vector<RefPtr<TimelineTraceEventProcessor>, ProcessorsVectorInlineCapacity> m_processors;
106
};
107
108
} // namespce
109
TimelineTraceEventProcessor::TimelineTraceEventProcessor(WeakPtr<InspectorTimelineAgent> timelineAgent, InspectorClient *client)
110
    : m_timelineAgent(timelineAgent)
111
    , m_inspectorClient(client)
112
    , m_pageId(reinterpret_cast<unsigned long long>(m_timelineAgent.get()->page()))
113
{
114
    TraceEventDispatcher::instance()->addProcessor(this, m_inspectorClient);
115
}
116
117
TimelineTraceEventProcessor::~TimelineTraceEventProcessor()
118
{
119
    TraceEventDispatcher::instance()->removeProcessor(this, m_inspectorClient);
120
}
121
122
const TimelineTraceEventProcessor::TraceValueUnion& TimelineTraceEventProcessor::TraceEvent::parameter(const char* name, TraceValueTypes expectedType) const
123
{
124
    const static TraceValueUnion missingValue;
125
126
    for (int i = 0; i < m_argumentCount; ++i) {
127
        if (!strcmp(name, m_argumentNames[i])) {
128
            if (m_argumentTypes[i] != expectedType) {
129
                ASSERT_NOT_REACHED();
130
                return missingValue;
131
            }
132
            return *reinterpret_cast<const TraceValueUnion*>(m_argumentValues + i);
133
        }
134
    }
135
    ASSERT_NOT_REACHED();
136
    return missingValue;
137
}
138
139
void TimelineTraceEventProcessor::processEventOnAnyThread(TraceEventPhase phase, const char* name, unsigned long long,
140
    int numArgs, const char* const* argNames, const unsigned char* argTypes, const unsigned long long* argValues,
141
    unsigned char)
142
{
143
    HashMap<String, EventTypeEntry>::iterator it = m_handlersByType.find(name);
144
    if (it == m_handlersByType.end())
145
        return;
146
147
    TraceEvent event(WTF::monotonicallyIncreasingTime(), phase, name, currentThread(), numArgs, argNames, argTypes, argValues);
148
149
    if (!isMainThread()) {
150
        MutexLocker locker(m_backgroundEventsMutex);
151
        m_backgroundEvents.append(event);
152
        return;
153
    }
154
155
    processEvent(it->value, event);
156
}
157
158
void TimelineTraceEventProcessor::processEvent(const EventTypeEntry& eventTypeEntry, const TraceEvent& event)
159
{
160
    ASSERT(isMainThread());
161
162
    TraceEventHandler handler = 0;
163
    switch (event.phase()) {
164
    case TracePhaseBegin:
165
        handler = eventTypeEntry.m_begin;
166
        break;
167
    case TracePhaseEnd:
168
        handler = eventTypeEntry.m_end;
169
        break;
170
    case TracePhaseInstant:
171
        handler = eventTypeEntry.m_instant;
172
        break;
173
    default:
174
        ASSERT_NOT_REACHED();
175
    }
176
    if (!handler) {
177
        ASSERT_NOT_REACHED();
178
        return;
179
    }
180
    (this->*handler)(event);
181
}
182
183
void TimelineTraceEventProcessor::sendTimelineRecord(PassRefPtr<InspectorObject> data, const String& recordType, double startTime, double endTime, const String& thread)
184
{
185
    ASSERT(isMainThread());
186
187
    InspectorTimelineAgent* timelineAgent = m_timelineAgent.get();
188
    if (!timelineAgent)
189
        return;
190
    timelineAgent->appendBackgroundThreadRecord(data, recordType, startTime, endTime, thread);
191
}
192
193
void TimelineTraceEventProcessor::processBackgroundEvents()
194
{
195
    ASSERT(isMainThread());
196
197
    Vector<TraceEvent> events;
198
    {
199
        MutexLocker locker(m_backgroundEventsMutex);
200
        events.reserveCapacity(m_backgroundEvents.capacity());
201
        m_backgroundEvents.swap(events);
202
    }
203
    for (size_t i = 0, size = events.size(); i < size; ++i) {
204
        const TraceEvent& event = events[i];
205
        processEvent(m_handlersByType.find(event.name())->value, event);
206
    }
207
}
208
209
} // namespace WebCore
210
211
#endif // ENABLE(INSPECTOR)
- a/Source/WebCore/inspector/TimelineTraceEventProcessor.h +195 lines
Line 0 a/Source/WebCore/inspector/TimelineTraceEventProcessor.h_sec1
1
/*
2
* Copyright (C) 2012 Google Inc. All rights reserved.
3
*
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions are
6
* met:
7
*
8
*     * Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
*     * Redistributions in binary form must reproduce the above
11
* copyright notice, this list of conditions and the following disclaimer
12
* in the documentation and/or other materials provided with the
13
* distribution.
14
*     * Neither the name of Google Inc. nor the names of its
15
* contributors may be used to endorse or promote products derived from
16
* this software without specific prior written permission.
17
*
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
*/
30
31
#ifndef TimelineTraceEventProcessor_h
32
#define TimelineTraceEventProcessor_h
33
34
#if ENABLE(INSPECTOR)
35
36
#include "InspectorValues.h"
37
38
#include <wtf/HashMap.h>
39
#include <wtf/HashSet.h>
40
#include <wtf/Noncopyable.h>
41
#include <wtf/Threading.h>
42
#include <wtf/Vector.h>
43
#include <wtf/WeakPtr.h>
44
#include <wtf/text/WTFString.h>
45
46
namespace WebCore {
47
48
class InspectorClient;
49
class InspectorTimelineAgent;
50
class Page;
51
52
class TimelineTraceEventProcessor : public ThreadSafeRefCounted<TimelineTraceEventProcessor> {
53
public:
54
    // FIXME: re-use definitions in TraceEvent.h once it's promoted to all platforms.
55
    enum TraceEventPhase {
56
        TracePhaseBegin = 'B',
57
        TracePhaseEnd = 'E',
58
        TracePhaseInstant = 'I'
59
    };
60
61
    TimelineTraceEventProcessor(WeakPtr<InspectorTimelineAgent>, InspectorClient*);
62
    ~TimelineTraceEventProcessor();
63
64
    void processEventOnAnyThread(TraceEventPhase, const char* name, unsigned long long id,
65
        int numArgs, const char* const* argNames, const unsigned char* argTypes, const unsigned long long* argValues,
66
        unsigned char flags);
67
    
68
private:
69
    // FIXME: use the definition in TraceEvent.h once we expose the latter to all plaforms.
70
    union TraceValueUnion {
71
        unsigned long long m_uint;
72
        long long m_int;
73
        double m_double;
74
        bool m_bool;
75
        const void* m_pointer;
76
        const char* m_string;
77
78
        TraceValueUnion() { }
79
    };
80
81
    enum TraceValueTypes {
82
        TypeBool = 1,
83
        TypeUInt = 2,
84
        TypeInt = 3,
85
        TypeDouble = 4,
86
        TypePointer = 5,
87
        TypeString = 6,
88
        TypeCopyString = 7
89
    };
90
91
    class TraceEvent {
92
    public:
93
        TraceEvent()
94
            : m_argumentCount(0)
95
        {
96
        }
97
98
        TraceEvent(double timestamp, TraceEventPhase phase, const char* name, ThreadIdentifier threadIdentifier,
99
            int argumentCount, const char* const* argumentNames, const unsigned char* argumentTypes, const unsigned long long* argumentValues)
100
            : m_timestamp(timestamp)
101
            , m_phase(phase)
102
            , m_name(name)
103
            , m_threadIdentifier(threadIdentifier)
104
            , m_argumentCount(argumentCount)
105
            , m_argumentNames(argumentNames)
106
            , m_argumentTypes(argumentTypes)
107
            , m_argumentValues(argumentValues)
108
        {
109
        }
110
111
        double timestamp() const { return m_timestamp; }
112
        TraceEventPhase phase() const { return m_phase; }
113
        const char* name() const { return m_name; }
114
        ThreadIdentifier threadIdentifier() const { return m_threadIdentifier; }
115
        int argumentCount() const { return m_argumentCount; }
116
117
        bool asBool(const char* name) const
118
        { 
119
            return parameter(name, TypeBool).m_bool;
120
        }
121
        long long asInt(const char* name) const
122
        { 
123
            return parameter(name, TypeInt).m_int;
124
        }
125
        unsigned long long asUInt(const char* name) const 
126
        { 
127
            return parameter(name, TypeUInt).m_uint;
128
        }
129
        double asDouble(const char* name) const
130
        { 
131
            return parameter(name, TypeDouble).m_double;
132
        }
133
        const char* asString(const char* name) const
134
        {
135
            return parameter(name, TypeString).m_string;
136
        }
137
138
    private:
139
        const TraceValueUnion& parameter(const char* name, TraceValueTypes expectedType) const;
140
141
        double m_timestamp;
142
        TraceEventPhase m_phase;
143
        const char* m_name;
144
        ThreadIdentifier m_threadIdentifier;
145
        int m_argumentCount;
146
        const char* const* m_argumentNames;
147
        const unsigned char* m_argumentTypes;
148
        const unsigned long long* m_argumentValues;
149
    };
150
151
    typedef void (TimelineTraceEventProcessor::*TraceEventHandler)(const TraceEvent&);
152
153
    struct EventTypeEntry {
154
        EventTypeEntry()
155
            : m_begin(0)
156
            , m_end(0)
157
            , m_instant(0)
158
        {
159
        }
160
        explicit EventTypeEntry(TraceEventHandler instant)
161
            : m_begin(0)
162
            , m_end(0)
163
            , m_instant(instant)
164
        {
165
        }
166
        EventTypeEntry(TraceEventHandler begin, TraceEventHandler end)
167
            : m_begin(begin)
168
            , m_end(end)
169
            , m_instant(0)
170
        {
171
        }
172
173
        TraceEventHandler m_begin;
174
        TraceEventHandler m_end;
175
        TraceEventHandler m_instant;
176
    };
177
178
    void processBackgroundEvents();
179
    void sendTimelineRecord(PassRefPtr<InspectorObject> data, const String& recordType, double startTime, double endTime, const String& thread);
180
    void processEvent(const EventTypeEntry&, const TraceEvent&);
181
182
    WeakPtr<InspectorTimelineAgent> m_timelineAgent;
183
    InspectorClient* m_inspectorClient;
184
185
    HashMap<String, EventTypeEntry> m_handlersByType;
186
    Mutex m_backgroundEventsMutex;
187
    Vector<TraceEvent> m_backgroundEvents;
188
    unsigned long long m_pageId;
189
};
190
191
192
} // namespace WebCore
193
194
#endif // ENABLE(INSPECTOR)
195
#endif // !defined(TimelineTraceEventProcessor_h)
- a/Source/WebKit/chromium/public/WebDevToolsAgentClient.h +6 lines
Lines 77-82 public: a/Source/WebKit/chromium/public/WebDevToolsAgentClient.h_sec1
77
    };
77
    };
78
    virtual void dumpUncountedAllocatedObjects(const InstrumentedObjectSizeProvider*) { }
78
    virtual void dumpUncountedAllocatedObjects(const InstrumentedObjectSizeProvider*) { }
79
79
80
    typedef void (*TraceEventCallback)(char phase, const unsigned char*, const char* name, unsigned long long id,
81
        int numArgs, const char* const* argNames, const unsigned char* argTypes, const unsigned long long* argValues,
82
        unsigned char flags);
83
84
    virtual void setTraceEventCallback(TraceEventCallback) { }
85
80
protected:
86
protected:
81
    ~WebDevToolsAgentClient() { }
87
    ~WebDevToolsAgentClient() { }
82
};
88
};
- a/Source/WebKit/chromium/src/InspectorClientImpl.cpp +6 lines
Lines 218-223 bool InspectorClientImpl::handleJavaScriptDialog(bool accept) a/Source/WebKit/chromium/src/InspectorClientImpl.cpp_sec1
218
    return false;
218
    return false;
219
}
219
}
220
220
221
void InspectorClientImpl::setTraceEventCallback(TraceEventCallback callback)
222
{
223
    if (WebDevToolsAgentImpl* agent = devToolsAgent())
224
        agent->setTraceEventCallback(callback);
225
}
226
221
WebDevToolsAgentImpl* InspectorClientImpl::devToolsAgent()
227
WebDevToolsAgentImpl* InspectorClientImpl::devToolsAgent()
222
{
228
{
223
    return static_cast<WebDevToolsAgentImpl*>(m_inspectedWebView->devToolsAgent());
229
    return static_cast<WebDevToolsAgentImpl*>(m_inspectedWebView->devToolsAgent());
- a/Source/WebKit/chromium/src/InspectorClientImpl.h +1 lines
Lines 88-93 public: a/Source/WebKit/chromium/src/InspectorClientImpl.h_sec1
88
    virtual void dumpUncountedAllocatedObjects(const HashMap<const void*, size_t>&);
88
    virtual void dumpUncountedAllocatedObjects(const HashMap<const void*, size_t>&);
89
89
90
    virtual bool captureScreenshot(WTF::String* data);
90
    virtual bool captureScreenshot(WTF::String* data);
91
    virtual void setTraceEventCallback(TraceEventCallback);
91
92
92
    virtual bool handleJavaScriptDialog(bool accept);
93
    virtual bool handleJavaScriptDialog(bool accept);
93
94
- a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp +5 lines
Lines 591-596 bool WebDevToolsAgentImpl::handleJavaScriptDialog(bool accept) a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp_sec1
591
    return true;
591
    return true;
592
}
592
}
593
593
594
void WebDevToolsAgentImpl::setTraceEventCallback(TraceEventCallback callback)
595
{
596
    m_client->setTraceEventCallback(callback);
597
}
598
594
void WebDevToolsAgentImpl::dispatchOnInspectorBackend(const WebString& message)
599
void WebDevToolsAgentImpl::dispatchOnInspectorBackend(const WebString& message)
595
{
600
{
596
    inspectorController()->dispatchMessageFromFrontend(message);
601
    inspectorController()->dispatchMessageFromFrontend(message);
- a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h +1 lines
Lines 110-115 public: a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h_sec1
110
110
111
    virtual void getAllocatedObjects(HashSet<const void*>&);
111
    virtual void getAllocatedObjects(HashSet<const void*>&);
112
    virtual void dumpUncountedAllocatedObjects(const HashMap<const void*, size_t>&);
112
    virtual void dumpUncountedAllocatedObjects(const HashMap<const void*, size_t>&);
113
    virtual void setTraceEventCallback(TraceEventCallback);
113
114
114
    virtual bool captureScreenshot(WTF::String* data);
115
    virtual bool captureScreenshot(WTF::String* data);
115
116

Return to Bug 105796