Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (191642 => 191643)
--- trunk/Source/_javascript_Core/ChangeLog 2015-10-27 21:47:13 UTC (rev 191642)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-10-27 22:08:03 UTC (rev 191643)
@@ -1,3 +1,12 @@
+2015-10-27 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: Remove unused / duplicated XHR timeline instrumentation
+ https://bugs.webkit.org/show_bug.cgi?id=150605
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/protocol/Timeline.json:
+
2015-10-27 Michael Saboff <msab...@apple.com>
REGRESSION (r191360): Crash: com.apple.WebKit.WebContent at com.apple._javascript_Core: JSC::FTL:: + 386
Modified: trunk/Source/_javascript_Core/inspector/protocol/Timeline.json (191642 => 191643)
--- trunk/Source/_javascript_Core/inspector/protocol/Timeline.json 2015-10-27 21:47:13 UTC (rev 191642)
+++ trunk/Source/_javascript_Core/inspector/protocol/Timeline.json 2015-10-27 22:08:03 UTC (rev 191643)
@@ -25,8 +25,6 @@
"TimeStamp",
"Time",
"TimeEnd",
- "XHRReadyStateChange",
- "XHRLoad",
"FunctionCall",
"ProbeSample",
"ConsoleProfile",
Modified: trunk/Source/WebCore/ChangeLog (191642 => 191643)
--- trunk/Source/WebCore/ChangeLog 2015-10-27 21:47:13 UTC (rev 191642)
+++ trunk/Source/WebCore/ChangeLog 2015-10-27 22:08:03 UTC (rev 191643)
@@ -1,5 +1,41 @@
2015-10-27 Joseph Pecoraro <pecor...@apple.com>
+ Web Inspector: Remove unused / duplicated XHR timeline instrumentation
+ https://bugs.webkit.org/show_bug.cgi?id=150605
+
+ Reviewed by Timothy Hatcher.
+
+ These records are just duplicates of "EventDispatch" records for XHR
+ load and readystatechange events. Due to the nesting, the XHR records
+ were themselves never getting looked at, and their data (URL / readyState)
+ not shown in the frontend.
+
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEventImpl): Deleted.
+ (WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEventImpl): Deleted.
+ (WebCore::InspectorInstrumentation::willDispatchXHRLoadEventImpl): Deleted.
+ (WebCore::InspectorInstrumentation::didDispatchXHRLoadEventImpl): Deleted.
+ * inspector/InspectorInstrumentation.h:
+ (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent): Deleted.
+ (WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent): Deleted.
+ (WebCore::InspectorInstrumentation::willDispatchXHRLoadEvent): Deleted.
+ (WebCore::InspectorInstrumentation::didDispatchXHRLoadEvent): Deleted.
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willDispatchXHRReadyStateChangeEvent): Deleted.
+ (WebCore::InspectorTimelineAgent::didDispatchXHRReadyStateChangeEvent): Deleted.
+ (WebCore::InspectorTimelineAgent::willDispatchXHRLoadEvent): Deleted.
+ (WebCore::InspectorTimelineAgent::didDispatchXHRLoadEvent): Deleted.
+ (WebCore::toProtocol): Deleted.
+ * inspector/InspectorTimelineAgent.h:
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createXHRReadyStateChangeData): Deleted.
+ (WebCore::TimelineRecordFactory::createXHRLoadData): Deleted.
+ * inspector/TimelineRecordFactory.h:
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::callReadyStateChangeListener): Deleted.
+
+2015-10-27 Joseph Pecoraro <pecor...@apple.com>
+
Web Inspector: Do not send RenderingFrame TimelineRecords that have no children
https://bugs.webkit.org/show_bug.cgi?id=150600
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (191642 => 191643)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2015-10-27 21:47:13 UTC (rev 191642)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2015-10-27 22:08:03 UTC (rev 191643)
@@ -345,23 +345,6 @@
timelineAgent->didCallFunction(frameForScriptExecutionContext(context));
}
-InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRReadyStateChangeEventImpl(InstrumentingAgents& instrumentingAgents, XMLHttpRequest& request, ScriptExecutionContext* context)
-{
- int timelineAgentId = 0;
- InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent();
- if (timelineAgent && request.hasEventListeners(eventNames().readystatechangeEvent)) {
- timelineAgent->willDispatchXHRReadyStateChangeEvent(request.url().string(), request.readyState(), frameForScriptExecutionContext(context));
- timelineAgentId = timelineAgent->id();
- }
- return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
-}
-
-void InspectorInstrumentation::didDispatchXHRReadyStateChangeEventImpl(const InspectorInstrumentationCookie& cookie)
-{
- if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
- timelineAgent->didDispatchXHRReadyStateChangeEvent();
-}
-
InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventImpl(InstrumentingAgents& instrumentingAgents, Document& document, const Event& event, bool hasEventListeners)
{
int timelineAgentId = 0;
@@ -484,23 +467,6 @@
pageAgent->didLayout();
}
-InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRLoadEventImpl(InstrumentingAgents& instrumentingAgents, XMLHttpRequest& request, ScriptExecutionContext* context)
-{
- int timelineAgentId = 0;
- InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent();
- if (timelineAgent && request.hasEventListeners(eventNames().loadEvent)) {
- timelineAgent->willDispatchXHRLoadEvent(request.url(), frameForScriptExecutionContext(context));
- timelineAgentId = timelineAgent->id();
- }
- return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
-}
-
-void InspectorInstrumentation::didDispatchXHRLoadEventImpl(const InspectorInstrumentationCookie& cookie)
-{
- if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
- timelineAgent->didDispatchXHRLoadEvent();
-}
-
void InspectorInstrumentation::willCompositeImpl(InstrumentingAgents& instrumentingAgents, Frame& frame)
{
if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (191642 => 191643)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2015-10-27 21:47:13 UTC (rev 191642)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2015-10-27 22:08:03 UTC (rev 191643)
@@ -146,8 +146,6 @@
static InspectorInstrumentationCookie willCallFunction(ScriptExecutionContext*, const String& scriptName, int scriptLine);
static void didCallFunction(const InspectorInstrumentationCookie&, ScriptExecutionContext*);
- static InspectorInstrumentationCookie willDispatchXHRReadyStateChangeEvent(ScriptExecutionContext*, XMLHttpRequest&);
- static void didDispatchXHRReadyStateChangeEvent(const InspectorInstrumentationCookie&);
static InspectorInstrumentationCookie willDispatchEvent(Document&, const Event&, bool hasEventListeners);
static void didDispatchEvent(const InspectorInstrumentationCookie&);
static InspectorInstrumentationCookie willHandleEvent(ScriptExecutionContext*, const Event&);
@@ -163,8 +161,6 @@
static InspectorInstrumentationCookie willLayout(Frame&);
static void didLayout(const InspectorInstrumentationCookie&, RenderObject*);
static void didScroll(Page&);
- static InspectorInstrumentationCookie willDispatchXHRLoadEvent(ScriptExecutionContext*, XMLHttpRequest&);
- static void didDispatchXHRLoadEvent(const InspectorInstrumentationCookie&);
static void willComposite(Frame&);
static void didComposite(Frame&);
static void willPaint(RenderObject*);
@@ -327,8 +323,6 @@
static InspectorInstrumentationCookie willCallFunctionImpl(InstrumentingAgents&, const String& scriptName, int scriptLine, ScriptExecutionContext*);
static void didCallFunctionImpl(const InspectorInstrumentationCookie&, ScriptExecutionContext*);
- static InspectorInstrumentationCookie willDispatchXHRReadyStateChangeEventImpl(InstrumentingAgents&, XMLHttpRequest&, ScriptExecutionContext*);
- static void didDispatchXHRReadyStateChangeEventImpl(const InspectorInstrumentationCookie&);
static InspectorInstrumentationCookie willDispatchEventImpl(InstrumentingAgents&, Document&, const Event&, bool hasEventListeners);
static InspectorInstrumentationCookie willHandleEventImpl(InstrumentingAgents&, const Event&);
static void didHandleEventImpl(const InspectorInstrumentationCookie&);
@@ -344,8 +338,6 @@
static InspectorInstrumentationCookie willLayoutImpl(InstrumentingAgents&, Frame&);
static void didLayoutImpl(const InspectorInstrumentationCookie&, RenderObject*);
static void didScrollImpl(InstrumentingAgents&);
- static InspectorInstrumentationCookie willDispatchXHRLoadEventImpl(InstrumentingAgents&, XMLHttpRequest&, ScriptExecutionContext*);
- static void didDispatchXHRLoadEventImpl(const InspectorInstrumentationCookie&);
static void willCompositeImpl(InstrumentingAgents&, Frame&);
static void didCompositeImpl(InstrumentingAgents&);
static void willPaintImpl(InstrumentingAgents&, RenderObject*);
@@ -705,21 +697,6 @@
didCallFunctionImpl(cookie, context);
}
-inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent(ScriptExecutionContext* context, XMLHttpRequest& request)
-{
- FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
- if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
- return willDispatchXHRReadyStateChangeEventImpl(*instrumentingAgents, request, context);
- return InspectorInstrumentationCookie();
-}
-
-inline void InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent(const InspectorInstrumentationCookie& cookie)
-{
- FAST_RETURN_IF_NO_FRONTENDS(void());
- if (cookie.isValid())
- didDispatchXHRReadyStateChangeEventImpl(cookie);
-}
-
inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEvent(Document& document, const Event& event, bool hasEventListeners)
{
FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
@@ -829,21 +806,6 @@
didScrollImpl(instrumentingAgentsForPage(page));
}
-inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRLoadEvent(ScriptExecutionContext* context, XMLHttpRequest& request)
-{
- FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
- if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
- return willDispatchXHRLoadEventImpl(*instrumentingAgents, request, context);
- return InspectorInstrumentationCookie();
-}
-
-inline void InspectorInstrumentation::didDispatchXHRLoadEvent(const InspectorInstrumentationCookie& cookie)
-{
- FAST_RETURN_IF_NO_FRONTENDS(void());
- if (cookie.isValid())
- didDispatchXHRLoadEventImpl(cookie);
-}
-
inline void InspectorInstrumentation::willComposite(Frame& frame)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp (191642 => 191643)
--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp 2015-10-27 21:47:13 UTC (rev 191642)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp 2015-10-27 22:08:03 UTC (rev 191643)
@@ -449,26 +449,6 @@
didCompleteCurrentRecord(TimelineRecordType::TimerFire);
}
-void InspectorTimelineAgent::willDispatchXHRReadyStateChangeEvent(const String& url, int readyState, Frame* frame)
-{
- pushCurrentRecord(TimelineRecordFactory::createXHRReadyStateChangeData(url, readyState), TimelineRecordType::XHRReadyStateChange, false, frame);
-}
-
-void InspectorTimelineAgent::didDispatchXHRReadyStateChangeEvent()
-{
- didCompleteCurrentRecord(TimelineRecordType::XHRReadyStateChange);
-}
-
-void InspectorTimelineAgent::willDispatchXHRLoadEvent(const String& url, Frame* frame)
-{
- pushCurrentRecord(TimelineRecordFactory::createXHRLoadData(url), TimelineRecordType::XHRLoad, true, frame);
-}
-
-void InspectorTimelineAgent::didDispatchXHRLoadEvent()
-{
- didCompleteCurrentRecord(TimelineRecordType::XHRLoad);
-}
-
void InspectorTimelineAgent::willEvaluateScript(const String& url, int lineNumber, Frame& frame)
{
pushCurrentRecord(TimelineRecordFactory::createEvaluateScriptData(url, lineNumber), TimelineRecordType::EvaluateScript, true, &frame);
@@ -628,11 +608,6 @@
case TimelineRecordType::TimeEnd:
return Inspector::Protocol::Timeline::EventType::TimeEnd;
- case TimelineRecordType::XHRReadyStateChange:
- return Inspector::Protocol::Timeline::EventType::XHRReadyStateChange;
- case TimelineRecordType::XHRLoad:
- return Inspector::Protocol::Timeline::EventType::XHRLoad;
-
case TimelineRecordType::FunctionCall:
return Inspector::Protocol::Timeline::EventType::FunctionCall;
case TimelineRecordType::ProbeSample:
Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.h (191642 => 191643)
--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.h 2015-10-27 21:47:13 UTC (rev 191642)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.h 2015-10-27 22:08:03 UTC (rev 191643)
@@ -89,9 +89,6 @@
Time,
TimeEnd,
- XHRReadyStateChange,
- XHRLoad,
-
FunctionCall,
ProbeSample,
ConsoleProfile,
@@ -141,8 +138,6 @@
void didFireTimer();
void willCallFunction(const String& scriptName, int scriptLine, Frame*);
void didCallFunction(Frame*);
- void willDispatchXHRReadyStateChangeEvent(const String&, int, Frame*);
- void didDispatchXHRReadyStateChangeEvent();
void willDispatchEvent(const Event&, Frame*);
void didDispatchEvent();
void willEvaluateScript(const String&, int, Frame&);
@@ -150,8 +145,6 @@
void didInvalidateLayout(Frame&);
void willLayout(Frame&);
void didLayout(RenderObject*);
- void willDispatchXHRLoadEvent(const String&, Frame*);
- void didDispatchXHRLoadEvent();
void willComposite(Frame&);
void didComposite();
void willPaint(Frame&);
Modified: trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp (191642 => 191643)
--- trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp 2015-10-27 21:47:13 UTC (rev 191642)
+++ trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp 2015-10-27 22:08:03 UTC (rev 191643)
@@ -116,21 +116,6 @@
return WTF::move(data);
}
-Ref<InspectorObject> TimelineRecordFactory::createXHRReadyStateChangeData(const String& url, int readyState)
-{
- Ref<InspectorObject> data = ""
- data->setString("url", url);
- data->setInteger("readyState", readyState);
- return WTF::move(data);
-}
-
-Ref<InspectorObject> TimelineRecordFactory::createXHRLoadData(const String& url)
-{
- Ref<InspectorObject> data = ""
- data->setString("url", url);
- return WTF::move(data);
-}
-
Ref<InspectorObject> TimelineRecordFactory::createEvaluateScriptData(const String& url, double lineNumber)
{
Ref<InspectorObject> data = ""
Modified: trunk/Source/WebCore/inspector/TimelineRecordFactory.h (191642 => 191643)
--- trunk/Source/WebCore/inspector/TimelineRecordFactory.h 2015-10-27 21:47:13 UTC (rev 191642)
+++ trunk/Source/WebCore/inspector/TimelineRecordFactory.h 2015-10-27 22:08:03 UTC (rev 191643)
@@ -69,10 +69,6 @@
static Ref<Inspector::InspectorObject> createTimerInstallData(int timerId, int timeout, bool singleShot);
- static Ref<Inspector::InspectorObject> createXHRReadyStateChangeData(const String& url, int readyState);
-
- static Ref<Inspector::InspectorObject> createXHRLoadData(const String& url);
-
static Ref<Inspector::InspectorObject> createEvaluateScriptData(const String&, double lineNumber);
static Ref<Inspector::InspectorObject> createTimeStampData(const String&);
Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (191642 => 191643)
--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp 2015-10-27 21:47:13 UTC (rev 191642)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp 2015-10-27 22:08:03 UTC (rev 191643)
@@ -373,16 +373,11 @@
if (!scriptExecutionContext())
return;
- InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent(scriptExecutionContext(), *this);
-
if (m_async || (m_state <= OPENED || m_state == DONE))
m_progressEventThrottle.dispatchReadyStateChangeEvent(Event::create(eventNames().readystatechangeEvent, false, false), m_state == DONE ? FlushProgressEvent : DoNotFlushProgressEvent);
- InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent(cookie);
if (m_state == DONE && !m_error) {
- InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispatchXHRLoadEvent(scriptExecutionContext(), *this);
m_progressEventThrottle.dispatchProgressEvent(eventNames().loadEvent);
- InspectorInstrumentation::didDispatchXHRLoadEvent(cookie);
m_progressEventThrottle.dispatchProgressEvent(eventNames().loadendEvent);
}
}
Modified: trunk/Source/WebInspectorUI/ChangeLog (191642 => 191643)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-10-27 21:47:13 UTC (rev 191642)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-10-27 22:08:03 UTC (rev 191643)
@@ -1,3 +1,15 @@
+2015-10-27 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: Remove unused / duplicated XHR timeline instrumentation
+ https://bugs.webkit.org/show_bug.cgi?id=150605
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Controllers/TimelineManager.js:
+ (WebInspector.TimelineManager.prototype._processRecord):
+ Remove unused events and add an assert that we don't miss
+ any script embedders.
+
2015-10-27 Matt Baker <mattba...@apple.com>
REGRESSION: Web Inspector: DOM path bar blinks when modifying inline styles
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (191642 => 191643)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2015-10-27 21:47:13 UTC (rev 191642)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2015-10-27 22:08:03 UTC (rev 191643)
@@ -343,12 +343,10 @@
return new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.TimerFired, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.timerId, profileData);
case TimelineAgent.EventType.EventDispatch:
return new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.EventDispatched, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.type, profileData);
- case TimelineAgent.EventType.XHRLoad:
- return new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.EventDispatched, startTime, endTime, callFrames, sourceCodeLocation, "load", profileData);
- case TimelineAgent.EventType.XHRReadyStateChange:
- return new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.EventDispatched, startTime, endTime, callFrames, sourceCodeLocation, "readystatechange", profileData);
case TimelineAgent.EventType.FireAnimationFrame:
return new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.AnimationFrameFired, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.id, profileData);
+ default:
+ console.assert(false, "Missed FunctionCall embedded inside of: " + parentRecordPayload.type);
}
break;