https://bugs.webkit.org/show_bug.cgi?id=68695
In a complex web application developer might want to timeline a specific piece of code.
In this case he can do the next steps:
1) start timeline;
2) eval a command in console;
3) stop timeline.
I think it'd be nice to have a root event for the all the events that happened as the result of such eval.
Reviewed by Yury Semikhatsky.
Source/WebCore:
Test: inspector/timeline/timeline-injected-script-eval.html
* bindings/v8/ScriptFunctionCall.cpp:
* inspector/InjectedScript.cpp:
(WebCore::InjectedScript::makeCall):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willCallFunctionImpl):
LayoutTests:
* inspector/timeline/timeline-injected-script-eval-expected.txt: Added.
* inspector/timeline/timeline-injected-script-eval.html: Added.
* platform/chromium/inspector/timeline/timeline-injected-script-eval-expected.txt: Added.
* platform/chromium/inspector/timeline/timeline-receive-response-event-expected.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95941
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-09-23 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: Timeline: record root event for the function calls enforced by console eval.
+ https://bugs.webkit.org/show_bug.cgi?id=68695
+
+ In a complex web application developer might want to timeline a specific piece of code.
+
+ In this case he can do the next steps:
+ 1) start timeline;
+ 2) eval a command in console;
+ 3) stop timeline.
+
+ I think it'd be nice to have a root event for the all the events that happened as the result of such eval.
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/timeline/timeline-injected-script-eval-expected.txt: Added.
+ * inspector/timeline/timeline-injected-script-eval.html: Added.
+ * platform/chromium/inspector/timeline/timeline-injected-script-eval-expected.txt: Added.
+ * platform/chromium/inspector/timeline/timeline-receive-response-event-expected.txt:
+
2011-09-26 James Robinson <jamesr@chromium.org>
[mac] Timestamp parameter to requestAnimationFrame is busted in USE(REQUEST_ANIMATION_FRAME_TIMER) path
--- /dev/null
+Tests the Timeline API function call record for InjectedScript.eval call feature.
--- /dev/null
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="timeline-test.js"></script>
+<script>
+
+function performActions()
+{
+}
+
+function test()
+{
+ InspectorTest.performActionsAndPrint("performActions()", "FunctionCall");
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Tests the Timeline API function call record for InjectedScript.eval call feature.
+</p>
+
+</body>
+</html>
--- /dev/null
+Tests the Timeline API function call record for InjectedScript.eval call feature.
+
+FunctionCall Properties:
+{
+ startTime : <number>
+ data : {
+ scriptName : "InjectedScript"
+ scriptLine : 1
+ }
+ children : <object>
+ endTime : <number>
+ type : "FunctionCall"
+ usedHeapSize : <number>
+ totalHeapSize : <number>
+}
+FunctionCall Properties:
+{
+ startTime : <number>
+ data : {
+ scriptName : "InjectedScript"
+ scriptLine : 1
+ }
+ children : <object>
+ endTime : <number>
+ type : "FunctionCall"
+ usedHeapSize : <number>
+ totalHeapSize : <number>
+}
+
Tests the Timeline API instrumentation of a SendRequest, ReceiveResponse etc.
+FunctionCall
ResourceSendRequest
ResourceReceiveResponse
ResourceReceivedData
ResourceFinish
+FunctionCall
ResourceSendRequest
ResourceReceiveResponse
ResourceReceivedData
+2011-09-23 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: Timeline: record root event for the function calls enforced by console eval.
+ https://bugs.webkit.org/show_bug.cgi?id=68695
+
+ In a complex web application developer might want to timeline a specific piece of code.
+
+ In this case he can do the next steps:
+ 1) start timeline;
+ 2) eval a command in console;
+ 3) stop timeline.
+
+ I think it'd be nice to have a root event for the all the events that happened as the result of such eval.
+
+ Reviewed by Yury Semikhatsky.
+
+ Test: inspector/timeline/timeline-injected-script-eval.html
+
+ * bindings/v8/ScriptFunctionCall.cpp:
+ * inspector/InjectedScript.cpp:
+ (WebCore::InjectedScript::makeCall):
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore::InspectorInstrumentation::willCallFunctionImpl):
+
2011-09-26 No'am Rosenthal <noam.rosenthal@nokia.com>
[Texmap][Qt] Enable TextureMapperGL in platforms where BGRA is not present
#if ENABLE(INSPECTOR)
+#include "DOMWindow.h"
#include "Frame.h"
#include "InjectedScriptHost.h"
#include "InjectedScriptManager.h"
+#include "InspectorInstrumentation.h"
#include "InspectorValues.h"
#include "Node.h"
#include "PlatformString.h"
return;
}
+ DOMWindow* domWindow = domWindowFromScriptState(m_injectedScriptObject.scriptState());
+ InspectorInstrumentationCookie cookie = domWindow && domWindow->frame() ? InspectorInstrumentation::willCallFunction(domWindow->frame()->page(), "InjectedScript", 1) : InspectorInstrumentationCookie();
bool hadException = false;
ScriptValue resultValue = function.call(hadException);
+ InspectorInstrumentation::didCallFunction(cookie);
ASSERT(!hadException);
if (!hadException) {
InspectorInstrumentationCookie InspectorInstrumentation::willCallFunctionImpl(InstrumentingAgents* instrumentingAgents, const String& scriptName, int scriptLine)
{
+#if USE(JSC) // It is disabled for JSC see WK-BUG 40119
+ return InspectorInstrumentationCookie();
+#else
int timelineAgentId = 0;
if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent()) {
timelineAgent->willCallFunction(scriptName, scriptLine);
timelineAgentId = timelineAgent->id();
}
return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
+#endif
}
void InspectorInstrumentation::didCallFunctionImpl(const InspectorInstrumentationCookie& cookie)