[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
pfeldman at chromium.org
pfeldman at chromium.org
Thu Dec 3 13:24:34 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 95026618292fa2b055d5aab6d576e2167965d7ce
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 2 09:25:29 2009 +0000
2009-11-01 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
Web Inspector: Convert script tag event into a more generic
script eval event in timeline.
https://bugs.webkit.org/show_bug.cgi?id=30999
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::evaluate):
* html/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::scriptExecution):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willEvaluateScript):
(WebCore::InspectorTimelineAgent::didEvaluateScript):
* inspector/InspectorTimelineAgent.h:
(WebCore::):
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createEvaluateScriptTimelineRecord):
* inspector/TimelineRecordFactory.h:
* inspector/front-end/TimelineAgent.js:
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._formatRecord):
(WebInspector.TimelinePanel.prototype._getRecordDetails):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3f1e5f0..c9355bb 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,31 @@
+2009-11-01 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Convert script tag event into a more generic
+ script eval event in timeline.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30999
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluateInWorld):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluate):
+ * html/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::scriptExecution):
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willEvaluateScript):
+ (WebCore::InspectorTimelineAgent::didEvaluateScript):
+ * inspector/InspectorTimelineAgent.h:
+ (WebCore::):
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createEvaluateScriptTimelineRecord):
+ * inspector/TimelineRecordFactory.h:
+ * inspector/front-end/TimelineAgent.js:
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype._formatRecord):
+ (WebInspector.TimelinePanel.prototype._getRecordDetails):
+
2009-11-01 Brian Weinstein <bweinstein at apple.com>
Rubber-stamped by Mark Rowe.
diff --git a/WebCore/bindings/js/ScriptController.cpp b/WebCore/bindings/js/ScriptController.cpp
index 4a1d413..5791dd7 100644
--- a/WebCore/bindings/js/ScriptController.cpp
+++ b/WebCore/bindings/js/ScriptController.cpp
@@ -27,6 +27,7 @@
#include "Frame.h"
#include "GCController.h"
#include "HTMLPlugInElement.h"
+#include "InspectorTimelineAgent.h"
#include "JSDocument.h"
#include "NP_jsobject.h"
#include "Page.h"
@@ -117,10 +118,21 @@ ScriptValue ScriptController::evaluateInWorld(const ScriptSourceCode& sourceCode
RefPtr<Frame> protect = m_frame;
+#if ENABLE(INSPECTOR)
+ InspectorTimelineAgent* timelineAgent = m_frame->page() ? m_frame->page()->inspectorTimelineAgent() : 0;
+ if (timelineAgent)
+ timelineAgent->willEvaluateScript(sourceURL, sourceCode.startLine());
+#endif
+
exec->globalData().timeoutChecker.start();
Completion comp = WebCore::evaluateInWorld(exec, exec->dynamicGlobalObject()->globalScopeChain(), jsSourceCode, shell, world);
exec->globalData().timeoutChecker.stop();
+#if ENABLE(INSPECTOR)
+ if (timelineAgent)
+ timelineAgent->didEvaluateScript();
+#endif
+
// Evaluating the JavaScript could cause the frame to be deallocated
// so we start the keep alive timer here.
m_frame->keepAlive();
diff --git a/WebCore/bindings/v8/V8Proxy.cpp b/WebCore/bindings/v8/V8Proxy.cpp
index 9969755..df3f0df 100644
--- a/WebCore/bindings/v8/V8Proxy.cpp
+++ b/WebCore/bindings/v8/V8Proxy.cpp
@@ -37,6 +37,7 @@
#include "DOMObjectsInclude.h"
#include "DocumentLoader.h"
#include "FrameLoaderClient.h"
+#include "InspectorTimelineAgent.h"
#include "Page.h"
#include "PageGroup.h"
#include "ScriptController.h"
@@ -373,6 +374,12 @@ v8::Local<v8::Value> V8Proxy::evaluate(const ScriptSourceCode& source, Node* nod
{
ASSERT(v8::Context::InContext());
+#if ENABLE(INSPECTOR)
+ InspectorTimelineAgent* timelineAgent = m_frame->page() ? m_frame->page()->inspectorTimelineAgent() : 0;
+ if (timelineAgent)
+ timelineAgent->willEvaluateScript(source.url().isNull() ? String() : source.url().string(), source.startLine());
+#endif
+
v8::Local<v8::Value> result;
{
// Isolate exceptions that occur when compiling and executing
@@ -398,6 +405,12 @@ v8::Local<v8::Value> V8Proxy::evaluate(const ScriptSourceCode& source, Node* nod
result = runScript(script, source.url().string().isNull());
}
ChromiumBridge::traceEventEnd("v8.run", node, "");
+
+#if ENABLE(INSPECTOR)
+ if (timelineAgent)
+ timelineAgent->didEvaluateScript();
+#endif
+
return result;
}
diff --git a/WebCore/html/HTMLTokenizer.cpp b/WebCore/html/HTMLTokenizer.cpp
index 91285d9..02970ba 100644
--- a/WebCore/html/HTMLTokenizer.cpp
+++ b/WebCore/html/HTMLTokenizer.cpp
@@ -552,12 +552,6 @@ HTMLTokenizer::State HTMLTokenizer::scriptExecution(const ScriptSourceCode& sour
return state;
m_executingScript++;
-#if ENABLE(INSPECTOR)
- InspectorTimelineAgent* timelineAgent = m_doc->inspectorTimelineAgent();
- if (timelineAgent)
- timelineAgent->willEvaluateScriptTag(sourceCode.url().isNull() ? String() : sourceCode.url().string(), sourceCode.startLine());
-#endif
-
SegmentedString* savedPrependingSrc = m_currentPrependingSrc;
SegmentedString prependingSrc;
m_currentPrependingSrc = &prependingSrc;
@@ -615,11 +609,6 @@ HTMLTokenizer::State HTMLTokenizer::scriptExecution(const ScriptSourceCode& sour
m_currentPrependingSrc = savedPrependingSrc;
-#if ENABLE(INSPECTOR)
- if (timelineAgent)
- timelineAgent->didEvaluateScriptTag();
-#endif
-
return state;
}
diff --git a/WebCore/inspector/InspectorTimelineAgent.cpp b/WebCore/inspector/InspectorTimelineAgent.cpp
index 4f7b736..237e34e 100644
--- a/WebCore/inspector/InspectorTimelineAgent.cpp
+++ b/WebCore/inspector/InspectorTimelineAgent.cpp
@@ -145,14 +145,14 @@ void InspectorTimelineAgent::didLoadXHR()
didCompleteCurrentRecord(XHRLoadRecordType);
}
-void InspectorTimelineAgent::willEvaluateScriptTag(const String& url, int lineNumber)
+void InspectorTimelineAgent::willEvaluateScript(const String& url, int lineNumber)
{
- pushCurrentRecord(TimelineRecordFactory::createEvaluateScriptTagTimelineRecord(m_frontend, currentTimeInMilliseconds(), url, lineNumber), EvaluateScriptTagTimelineRecordType);
+ pushCurrentRecord(TimelineRecordFactory::createEvaluateScriptTimelineRecord(m_frontend, currentTimeInMilliseconds(), url, lineNumber), EvaluateScriptTimelineRecordType);
}
-void InspectorTimelineAgent::didEvaluateScriptTag()
+void InspectorTimelineAgent::didEvaluateScript()
{
- didCompleteCurrentRecord(EvaluateScriptTagTimelineRecordType);
+ didCompleteCurrentRecord(EvaluateScriptTimelineRecordType);
}
void InspectorTimelineAgent::reset()
diff --git a/WebCore/inspector/InspectorTimelineAgent.h b/WebCore/inspector/InspectorTimelineAgent.h
index 0401977..66f5601 100644
--- a/WebCore/inspector/InspectorTimelineAgent.h
+++ b/WebCore/inspector/InspectorTimelineAgent.h
@@ -53,7 +53,7 @@ namespace WebCore {
TimerFireTimelineRecordType = 7,
XHRReadyStateChangeRecordType = 8,
XHRLoadRecordType = 9,
- EvaluateScriptTagTimelineRecordType = 10,
+ EvaluateScriptTimelineRecordType = 10,
};
class InspectorTimelineAgent {
@@ -90,8 +90,8 @@ namespace WebCore {
void willLoadXHR(const String&);
void didLoadXHR();
- void willEvaluateScriptTag(const String&, int);
- void didEvaluateScriptTag();
+ void willEvaluateScript(const String&, int);
+ void didEvaluateScript();
static InspectorTimelineAgent* retrieve(ScriptExecutionContext*);
private:
diff --git a/WebCore/inspector/TimelineRecordFactory.cpp b/WebCore/inspector/TimelineRecordFactory.cpp
index 085bcd9..9a0a584 100644
--- a/WebCore/inspector/TimelineRecordFactory.cpp
+++ b/WebCore/inspector/TimelineRecordFactory.cpp
@@ -101,7 +101,7 @@ ScriptObject TimelineRecordFactory::createXHRLoadTimelineRecord(InspectorFronten
}
// static
-ScriptObject TimelineRecordFactory::createEvaluateScriptTagTimelineRecord(InspectorFrontend* frontend, double startTime, const String& url, double lineNumber)
+ScriptObject TimelineRecordFactory::createEvaluateScriptTimelineRecord(InspectorFrontend* frontend, double startTime, const String& url, double lineNumber)
{
ScriptObject item = createGenericRecord(frontend, startTime);
ScriptObject data = frontend->newScriptObject();
diff --git a/WebCore/inspector/TimelineRecordFactory.h b/WebCore/inspector/TimelineRecordFactory.h
index 3d36649..a43758e 100644
--- a/WebCore/inspector/TimelineRecordFactory.h
+++ b/WebCore/inspector/TimelineRecordFactory.h
@@ -52,7 +52,7 @@ namespace WebCore {
static ScriptObject createXHRReadyStateChangeTimelineRecord(InspectorFrontend*, double startTime, const String& url, int readyState);
static ScriptObject createXHRLoadTimelineRecord(InspectorFrontend*, double startTime, const String& url);
- static ScriptObject createEvaluateScriptTagTimelineRecord(InspectorFrontend*, double startTime, const String&, double lineNumber);
+ static ScriptObject createEvaluateScriptTimelineRecord(InspectorFrontend*, double startTime, const String&, double lineNumber);
private:
TimelineRecordFactory() { }
diff --git a/WebCore/inspector/front-end/TimelineAgent.js b/WebCore/inspector/front-end/TimelineAgent.js
index cbbb736..b309f01 100644
--- a/WebCore/inspector/front-end/TimelineAgent.js
+++ b/WebCore/inspector/front-end/TimelineAgent.js
@@ -44,7 +44,7 @@ WebInspector.TimelineAgent.RecordType = {
TimerFire : 7,
XHRReadyStateChange : 8,
XHRLoad : 9,
- EvaluateScriptTag : 10
+ EvaluateScript : 10
};
WebInspector.addRecordToTimeline = function(record) {
diff --git a/WebCore/inspector/front-end/TimelinePanel.js b/WebCore/inspector/front-end/TimelinePanel.js
index ce4e39b..8160766 100644
--- a/WebCore/inspector/front-end/TimelinePanel.js
+++ b/WebCore/inspector/front-end/TimelinePanel.js
@@ -151,7 +151,7 @@ WebInspector.TimelinePanel.prototype = {
this._recordStyles[recordTypes.TimerFire] = { title: WebInspector.UIString("Timer Fired"), category: this.categories.scripting };
this._recordStyles[recordTypes.XHRReadyStateChange] = { title: WebInspector.UIString("XHR Ready State Change"), category: this.categories.scripting };
this._recordStyles[recordTypes.XHRLoad] = { title: WebInspector.UIString("XHR Load"), category: this.categories.scripting };
- this._recordStyles[recordTypes.EvaluateScriptTag] = { title: WebInspector.UIString("Evaluate Script"), category: this.categories.scripting };
+ this._recordStyles[recordTypes.EvaluateScript] = { title: WebInspector.UIString("Evaluate Script"), category: this.categories.scripting };
this._recordStyles["Other"] = { title: WebInspector.UIString("Other"), icon: 0, category: this.categories.other };
}
@@ -182,7 +182,7 @@ WebInspector.TimelinePanel.prototype = {
return record.data.timerId;
case WebInspector.TimelineAgent.RecordType.XHRReadyStateChange:
case WebInspector.TimelineAgent.RecordType.XHRLoad:
- case WebInspector.TimelineAgent.RecordType.EvaluateScriptTag:
+ case WebInspector.TimelineAgent.RecordType.EvaluateScript:
return record.data.url;
default:
return "";
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list