[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
pfeldman at chromium.org
pfeldman at chromium.org
Sun Feb 20 23:52:57 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 9c856a3a50e6c6c70213ce2bfb688df893b36067
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 26 10:19:04 2011 +0000
2011-01-26 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: Incorrect on-hover evaluation of a variable named 'profile'.
https://bugs.webkit.org/show_bug.cgi?id=53018
* inspector/InjectedScript.cpp:
(WebCore::InjectedScript::evaluate):
(WebCore::InjectedScript::evaluateOnCallFrame):
(WebCore::InjectedScript::getCompletions):
(WebCore::InjectedScript::getCompletionsOnCallFrame):
* inspector/InjectedScript.h:
* inspector/InjectedScriptSource.js:
(.):
* inspector/Inspector.idl:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
(WebCore::InspectorDebuggerAgent::getCompletionsOnCallFrame):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::evaluate):
(WebCore::InspectorRuntimeAgent::getCompletions):
* inspector/InspectorRuntimeAgent.h:
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype.completions):
(WebInspector.ConsoleView.prototype.evalInInspectedWindow):
(WebInspector.ConsoleView.prototype._enterKeyPressed):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame.updatingCallbackWrapper):
(WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype._showPopup):
* inspector/front-end/WatchExpressionsSidebarPane.js:
(WebInspector.WatchExpressionsSection.prototype.update):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index ca9dfdd..f7464b8 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,39 @@
+2011-01-26 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: Incorrect on-hover evaluation of a variable named 'profile'.
+ https://bugs.webkit.org/show_bug.cgi?id=53018
+
+ * inspector/InjectedScript.cpp:
+ (WebCore::InjectedScript::evaluate):
+ (WebCore::InjectedScript::evaluateOnCallFrame):
+ (WebCore::InjectedScript::getCompletions):
+ (WebCore::InjectedScript::getCompletionsOnCallFrame):
+ * inspector/InjectedScript.h:
+ * inspector/InjectedScriptSource.js:
+ (.):
+ * inspector/Inspector.idl:
+ * inspector/InspectorDebuggerAgent.cpp:
+ (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
+ (WebCore::InspectorDebuggerAgent::getCompletionsOnCallFrame):
+ * inspector/InspectorDebuggerAgent.h:
+ * inspector/InspectorRuntimeAgent.cpp:
+ (WebCore::InspectorRuntimeAgent::evaluate):
+ (WebCore::InspectorRuntimeAgent::getCompletions):
+ * inspector/InspectorRuntimeAgent.h:
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.completions):
+ (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
+ (WebInspector.ConsoleView.prototype._enterKeyPressed):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame.updatingCallbackWrapper):
+ (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._showPopup):
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection.prototype.update):
+
2011-01-26 Hironori Bono <hbono at chromium.org>
Reviewed by Kent Tamura.
diff --git a/Source/WebCore/inspector/InjectedScript.cpp b/Source/WebCore/inspector/InjectedScript.cpp
index 1969f34..9fd606b 100644
--- a/Source/WebCore/inspector/InjectedScript.cpp
+++ b/Source/WebCore/inspector/InjectedScript.cpp
@@ -44,20 +44,22 @@ InjectedScript::InjectedScript(ScriptObject injectedScriptObject)
{
}
-void InjectedScript::evaluate(const String& expression, const String& objectGroup, RefPtr<InspectorValue>* result)
+void InjectedScript::evaluate(const String& expression, const String& objectGroup, bool includeCommandLineAPI, RefPtr<InspectorValue>* result)
{
ScriptFunctionCall function(m_injectedScriptObject, "evaluate");
function.appendArgument(expression);
function.appendArgument(objectGroup);
+ function.appendArgument(includeCommandLineAPI);
makeCall(function, result);
}
-void InjectedScript::evaluateOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, const String& objectGroup, RefPtr<InspectorValue>* result)
+void InjectedScript::evaluateOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, RefPtr<InspectorValue>* result)
{
ScriptFunctionCall function(m_injectedScriptObject, "evaluateOnCallFrame");
function.appendArgument(callFrameId->toJSONString());
function.appendArgument(expression);
function.appendArgument(objectGroup);
+ function.appendArgument(includeCommandLineAPI);
makeCall(function, result);
}
@@ -69,20 +71,20 @@ void InjectedScript::evaluateOnSelf(const String& functionBody, PassRefPtr<Inspe
makeCall(function, result);
}
-void InjectedScript::getCompletions(const String& expression, bool includeInspectorCommandLineAPI, RefPtr<InspectorValue>* result)
+void InjectedScript::getCompletions(const String& expression, bool includeCommandLineAPI, RefPtr<InspectorValue>* result)
{
ScriptFunctionCall function(m_injectedScriptObject, "getCompletions");
function.appendArgument(expression);
- function.appendArgument(includeInspectorCommandLineAPI);
+ function.appendArgument(includeCommandLineAPI);
makeCall(function, result);
}
-void InjectedScript::getCompletionsOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, bool includeInspectorCommandLineAPI, RefPtr<InspectorValue>* result)
+void InjectedScript::getCompletionsOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, bool includeCommandLineAPI, RefPtr<InspectorValue>* result)
{
ScriptFunctionCall function(m_injectedScriptObject, "getCompletionsOnCallFrame");
function.appendArgument(callFrameId->toJSONString());
function.appendArgument(expression);
- function.appendArgument(includeInspectorCommandLineAPI);
+ function.appendArgument(includeCommandLineAPI);
makeCall(function, result);
}
diff --git a/Source/WebCore/inspector/InjectedScript.h b/Source/WebCore/inspector/InjectedScript.h
index 0a3f24b..0dd41ae 100644
--- a/Source/WebCore/inspector/InjectedScript.h
+++ b/Source/WebCore/inspector/InjectedScript.h
@@ -50,11 +50,11 @@ public:
bool hasNoValue() const { return m_injectedScriptObject.hasNoValue(); }
- void evaluate(const String& expression, const String& objectGroup, RefPtr<InspectorValue>* result);
- void evaluateOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, const String& objectGroup, RefPtr<InspectorValue>* result);
+ void evaluate(const String& expression, const String& objectGroup, bool includeCommandLineAPI, RefPtr<InspectorValue>* result);
+ void evaluateOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, RefPtr<InspectorValue>* result);
void evaluateOnSelf(const String& functionBody, PassRefPtr<InspectorArray> argumentsArray, RefPtr<InspectorValue>* result);
- void getCompletions(const String& expression, bool includeInspectorCommandLineAPI, RefPtr<InspectorValue>* result);
- void getCompletionsOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, bool includeInspectorCommandLineAPI, RefPtr<InspectorValue>* result);
+ void getCompletions(const String& expression, bool includeCommandLineAPI, RefPtr<InspectorValue>* result);
+ void getCompletionsOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, bool includeCommandLineAPI, RefPtr<InspectorValue>* result);
void getProperties(PassRefPtr<InspectorObject> objectId, bool ignoreHasOwnProperty, bool abbreviate, RefPtr<InspectorValue>* result);
void pushNodeToFrontend(PassRefPtr<InspectorObject> objectId, RefPtr<InspectorValue>* result);
void resolveNode(long nodeId, RefPtr<InspectorValue>* result);
diff --git a/Source/WebCore/inspector/InjectedScriptSource.js b/Source/WebCore/inspector/InjectedScriptSource.js
index 3aa24a6..050b582 100644
--- a/Source/WebCore/inspector/InjectedScriptSource.js
+++ b/Source/WebCore/inspector/InjectedScriptSource.js
@@ -186,18 +186,18 @@ InjectedScript.prototype = {
return Object.keys(propertyNameSet);
},
- getCompletions: function(expression, includeInspectorCommandLineAPI)
+ getCompletions: function(expression, includeCommandLineAPI)
{
var props = {};
try {
if (!expression)
expression = "this";
- var expressionResult = this._evaluateOn(inspectedWindow.eval, inspectedWindow, expression, false);
+ var expressionResult = this._evaluateOn(inspectedWindow.eval, inspectedWindow, expression, false, false);
if (typeof expressionResult === "object")
this._populatePropertyNames(expressionResult, props);
- if (includeInspectorCommandLineAPI) {
+ if (includeCommandLineAPI) {
for (var prop in this._commandLineAPI)
props[prop] = true;
}
@@ -206,7 +206,7 @@ InjectedScript.prototype = {
return props;
},
- getCompletionsOnCallFrame: function(callFrameId, expression, includeInspectorCommandLineAPI)
+ getCompletionsOnCallFrame: function(callFrameId, expression, includeCommandLineAPI)
{
var props = {};
try {
@@ -215,7 +215,7 @@ InjectedScript.prototype = {
return props;
if (expression) {
- var expressionResult = this._evaluateOn(callFrame.evaluate, callFrame, expression, true);
+ var expressionResult = this._evaluateOn(callFrame.evaluate, callFrame, expression, true, false);
if (typeof expressionResult === "object")
this._populatePropertyNames(expressionResult, props);
} else {
@@ -225,7 +225,7 @@ InjectedScript.prototype = {
this._populatePropertyNames(scopeChain[i], props);
}
- if (includeInspectorCommandLineAPI) {
+ if (includeCommandLineAPI) {
for (var prop in this._commandLineAPI)
props[prop] = true;
}
@@ -234,21 +234,21 @@ InjectedScript.prototype = {
return props;
},
- evaluate: function(expression, objectGroup)
+ evaluate: function(expression, objectGroup, injectCommandLineAPI)
{
- return this._evaluateAndWrap(inspectedWindow.eval, inspectedWindow, expression, objectGroup, false);
+ return this._evaluateAndWrap(inspectedWindow.eval, inspectedWindow, expression, objectGroup, false, injectCommandLineAPI);
},
- _evaluateAndWrap: function(evalFunction, object, expression, objectGroup, isEvalOnCallFrame)
+ _evaluateAndWrap: function(evalFunction, object, expression, objectGroup, isEvalOnCallFrame, injectCommandLineAPI)
{
try {
- return this._wrapObject(this._evaluateOn(evalFunction, object, expression, isEvalOnCallFrame), objectGroup);
+ return this._wrapObject(this._evaluateOn(evalFunction, object, expression, isEvalOnCallFrame, injectCommandLineAPI), objectGroup);
} catch (e) {
return InjectedScript.RemoteObject.fromException(e);
}
},
- _evaluateOn: function(evalFunction, object, expression, isEvalOnCallFrame)
+ _evaluateOn: function(evalFunction, object, expression, isEvalOnCallFrame, injectCommandLineAPI)
{
// Only install command line api object for the time of evaluation.
// Surround the expression in with statements to inject our command line API so that
@@ -258,7 +258,8 @@ InjectedScript.prototype = {
// We don't want local variables to be shadowed by global ones when evaluating on CallFrame.
if (!isEvalOnCallFrame)
expression = "with (window) {\n" + expression + "\n} ";
- expression = "with (window ? window.console._commandLineAPI : {}) {\n" + expression + "\n}";
+ if (injectCommandLineAPI)
+ expression = "with (window ? window.console._commandLineAPI : {}) {\n" + expression + "\n}";
var value = evalFunction.call(object, expression);
delete inspectedWindow.console._commandLineAPI;
@@ -291,12 +292,12 @@ InjectedScript.prototype = {
return result;
},
- evaluateOnCallFrame: function(callFrameId, code, objectGroup)
+ evaluateOnCallFrame: function(callFrameId, expression, objectGroup, injectCommandLineAPI)
{
var callFrame = this._callFrameForId(callFrameId);
if (!callFrame)
return false;
- return this._evaluateAndWrap(callFrame.evaluate, callFrame, code, objectGroup, true);
+ return this._evaluateAndWrap(callFrame.evaluate, callFrame, expression, objectGroup, true, injectCommandLineAPI);
},
_callFrameForId: function(callFrameId)
diff --git a/Source/WebCore/inspector/Inspector.idl b/Source/WebCore/inspector/Inspector.idl
index a91765f..b8ccd8e 100644
--- a/Source/WebCore/inspector/Inspector.idl
+++ b/Source/WebCore/inspector/Inspector.idl
@@ -71,8 +71,8 @@ module core {
// Runtime
///////////////////////////////////////////////////////////////////////
- [domain=Runtime] void evaluate(in String expression, in String objectGroup, out Value result);
- [domain=Runtime] void getCompletions(in String expression, in boolean includeInspectorCommandLineAPI, out Value result);
+ [domain=Runtime] void evaluate(in String expression, in String objectGroup, in boolean includeCommandLineAPI, out Value result);
+ [domain=Runtime] void getCompletions(in String expression, in boolean includeCommandLineAPI, out Value result);
[domain=Runtime] void getProperties(in Object objectId, in boolean ignoreHasOwnProperty, in boolean abbreviate, out Value result);
[domain=Runtime] void setPropertyValue(in Object objectId, in String propertyName, in String expression, out Value result);
[domain=Runtime] void releaseWrapperObjectGroup(in long injectedScriptId, in String objectGroup);
@@ -276,8 +276,8 @@ module core {
[domain=Debugger] void setPauseOnExceptionsState(in long pauseOnExceptionsState, out long newState);
- [domain=Debugger] void evaluateOnCallFrame(in Object callFrameId, in String expression, in String objectGroup, out Value result);
- [domain=Debugger] void getCompletionsOnCallFrame(in Object callFrameId, in String expression, in boolean includeInspectorCommandLineAPI, out Value result);
+ [domain=Debugger] void evaluateOnCallFrame(in Object callFrameId, in String expression, in String objectGroup, in boolean includeCommandLineAPI, out Value result);
+ [domain=Debugger] void getCompletionsOnCallFrame(in Object callFrameId, in String expression, in boolean includeCommandLineAPI, out Value result);
[notify, domain=Debugger] void breakpointResolved(out String breakpointId, out Object breakpoint);
diff --git a/Source/WebCore/inspector/InspectorDebuggerAgent.cpp b/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
index 600e44f..9f3cce8 100644
--- a/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
@@ -249,18 +249,18 @@ void InspectorDebuggerAgent::setPauseOnExceptionsState(long pauseState, long* ne
*newState = ScriptDebugServer::shared().pauseOnExceptionsState();
}
-void InspectorDebuggerAgent::evaluateOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, const String& objectGroup, RefPtr<InspectorValue>* result)
+void InspectorDebuggerAgent::evaluateOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, RefPtr<InspectorValue>* result)
{
InjectedScript injectedScript = m_inspectorAgent->injectedScriptHost()->injectedScriptForObjectId(callFrameId.get());
if (!injectedScript.hasNoValue())
- injectedScript.evaluateOnCallFrame(callFrameId, expression, objectGroup, result);
+ injectedScript.evaluateOnCallFrame(callFrameId, expression, objectGroup, includeCommandLineAPI, result);
}
-void InspectorDebuggerAgent::getCompletionsOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, bool includeInspectorCommandLineAPI, RefPtr<InspectorValue>* result)
+void InspectorDebuggerAgent::getCompletionsOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, bool includeCommandLineAPI, RefPtr<InspectorValue>* result)
{
InjectedScript injectedScript = m_inspectorAgent->injectedScriptHost()->injectedScriptForObjectId(callFrameId.get());
if (!injectedScript.hasNoValue())
- injectedScript.getCompletionsOnCallFrame(callFrameId, expression, includeInspectorCommandLineAPI, result);
+ injectedScript.getCompletionsOnCallFrame(callFrameId, expression, includeCommandLineAPI, result);
}
PassRefPtr<InspectorValue> InspectorDebuggerAgent::currentCallFrames()
diff --git a/Source/WebCore/inspector/InspectorDebuggerAgent.h b/Source/WebCore/inspector/InspectorDebuggerAgent.h
index 29f45de..34ad0db 100644
--- a/Source/WebCore/inspector/InspectorDebuggerAgent.h
+++ b/Source/WebCore/inspector/InspectorDebuggerAgent.h
@@ -82,8 +82,8 @@ public:
void stepInto();
void stepOut();
void setPauseOnExceptionsState(long pauseState, long* newState);
- void evaluateOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, const String& objectGroup, RefPtr<InspectorValue>* result);
- void getCompletionsOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, bool includeInspectorCommandLineAPI, RefPtr<InspectorValue>* result);
+ void evaluateOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, RefPtr<InspectorValue>* result);
+ void getCompletionsOnCallFrame(PassRefPtr<InspectorObject> callFrameId, const String& expression, bool includeCommandLineAPI, RefPtr<InspectorValue>* result);
private:
InspectorDebuggerAgent(InspectorAgent*, InspectorFrontend*);
diff --git a/Source/WebCore/inspector/InspectorRuntimeAgent.cpp b/Source/WebCore/inspector/InspectorRuntimeAgent.cpp
index 0502437..7938afd 100644
--- a/Source/WebCore/inspector/InspectorRuntimeAgent.cpp
+++ b/Source/WebCore/inspector/InspectorRuntimeAgent.cpp
@@ -45,18 +45,18 @@ InspectorRuntimeAgent::InspectorRuntimeAgent(InjectedScriptHost* injectedScriptH
InspectorRuntimeAgent::~InspectorRuntimeAgent() { }
-void InspectorRuntimeAgent::evaluate(const String& expression, const String& objectGroup, RefPtr<InspectorValue>* result)
+void InspectorRuntimeAgent::evaluate(const String& expression, const String& objectGroup, bool includeCommandLineAPI, RefPtr<InspectorValue>* result)
{
InjectedScript injectedScript = m_injectedScriptHost->injectedScriptForMainFrame();
if (!injectedScript.hasNoValue())
- injectedScript.evaluate(expression, objectGroup, result);
+ injectedScript.evaluate(expression, objectGroup, includeCommandLineAPI, result);
}
-void InspectorRuntimeAgent::getCompletions(const String& expression, bool includeInspectorCommandLineAPI, RefPtr<InspectorValue>* result)
+void InspectorRuntimeAgent::getCompletions(const String& expression, bool includeCommandLineAPI, RefPtr<InspectorValue>* result)
{
InjectedScript injectedScript = m_injectedScriptHost->injectedScriptForMainFrame();
if (!injectedScript.hasNoValue())
- injectedScript.getCompletions(expression, includeInspectorCommandLineAPI, result);
+ injectedScript.getCompletions(expression, includeCommandLineAPI, result);
}
void InspectorRuntimeAgent::getProperties(PassRefPtr<InspectorObject> objectId, bool ignoreHasOwnProperty, bool abbreviate, RefPtr<InspectorValue>* result)
diff --git a/Source/WebCore/inspector/InspectorRuntimeAgent.h b/Source/WebCore/inspector/InspectorRuntimeAgent.h
index 3ac2eed..9fb2716 100644
--- a/Source/WebCore/inspector/InspectorRuntimeAgent.h
+++ b/Source/WebCore/inspector/InspectorRuntimeAgent.h
@@ -57,8 +57,8 @@ public:
~InspectorRuntimeAgent();
// Part of the protocol.
- void evaluate(const String& expression, const String& objectGroup, RefPtr<InspectorValue>* result);
- void getCompletions(const String& expression, bool includeInspectorCommandLineAPI, RefPtr<InspectorValue>* result);
+ void evaluate(const String& expression, const String& objectGroup, bool includeCommandLineAPI, RefPtr<InspectorValue>* result);
+ void getCompletions(const String& expression, bool includeCommandLineAPI, RefPtr<InspectorValue>* result);
void getProperties(PassRefPtr<InspectorObject> objectId, bool ignoreHasOwnProperty, bool abbreviate, RefPtr<InspectorValue>* result);
void setPropertyValue(PassRefPtr<InspectorObject> objectId, const String& propertyName, const String& expression, RefPtr<InspectorValue>* result);
void releaseWrapperObjectGroup(long injectedScriptId, const String& objectGroup);
diff --git a/Source/WebCore/inspector/front-end/ConsoleView.js b/Source/WebCore/inspector/front-end/ConsoleView.js
index bd08e60..7feb7ab 100644
--- a/Source/WebCore/inspector/front-end/ConsoleView.js
+++ b/Source/WebCore/inspector/front-end/ConsoleView.js
@@ -359,12 +359,12 @@ WebInspector.ConsoleView.prototype = {
var reportCompletions = this._reportCompletions.bind(this, bestMatchOnly, completionsReadyCallback, dotNotation, bracketNotation, prefix);
// Collect comma separated object properties for the completion.
- var includeInspectorCommandLineAPI = (!dotNotation && !bracketNotation);
+ var includeCommandLineAPI = (!dotNotation && !bracketNotation);
var injectedScriptAccess;
if (WebInspector.panels.scripts && WebInspector.panels.scripts.paused)
- InspectorBackend.getCompletionsOnCallFrame(WebInspector.panels.scripts.selectedCallFrameId(), expressionString, includeInspectorCommandLineAPI, reportCompletions);
+ InspectorBackend.getCompletionsOnCallFrame(WebInspector.panels.scripts.selectedCallFrameId(), expressionString, includeCommandLineAPI, reportCompletions);
else
- InspectorBackend.getCompletions(expressionString, includeInspectorCommandLineAPI, reportCompletions);
+ InspectorBackend.getCompletions(expressionString, includeCommandLineAPI, reportCompletions);
},
_reportCompletions: function(bestMatchOnly, completionsReadyCallback, dotNotation, bracketNotation, prefix, result, isException) {
@@ -510,17 +510,13 @@ WebInspector.ConsoleView.prototype = {
}
},
- evalInInspectedWindow: function(expression, objectGroup, callback)
+ evalInInspectedWindow: function(expression, objectGroup, includeCommandLineAPI, callback)
{
if (WebInspector.panels.scripts && WebInspector.panels.scripts.paused) {
- WebInspector.panels.scripts.evaluateInSelectedCallFrame(expression, false, objectGroup, callback);
+ WebInspector.panels.scripts.evaluateInSelectedCallFrame(expression, false, objectGroup, includeCommandLineAPI, callback);
return;
}
- this.doEvalInWindow(expression, objectGroup, callback);
- },
- doEvalInWindow: function(expression, objectGroup, callback)
- {
if (!expression) {
// There is no expression, so the completion should happen against global properties.
expression = "this";
@@ -530,7 +526,7 @@ WebInspector.ConsoleView.prototype = {
{
callback(WebInspector.RemoteObject.fromPayload(result));
}
- InspectorBackend.evaluate(expression, objectGroup, evalCallback);
+ InspectorBackend.evaluate(expression, objectGroup, includeCommandLineAPI, evalCallback);
},
_enterKeyPressed: function(event)
@@ -561,7 +557,7 @@ WebInspector.ConsoleView.prototype = {
self.addMessage(new WebInspector.ConsoleCommandResult(result, commandMessage));
}
- this.evalInInspectedWindow(str, "console", printResult);
+ this.evalInInspectedWindow(str, "console", true, printResult);
},
_format: function(output, forceObjectFormat)
diff --git a/Source/WebCore/inspector/front-end/ScriptsPanel.js b/Source/WebCore/inspector/front-end/ScriptsPanel.js
index fdcce37..6f2291d 100644
--- a/Source/WebCore/inspector/front-end/ScriptsPanel.js
+++ b/Source/WebCore/inspector/front-end/ScriptsPanel.js
@@ -314,7 +314,7 @@ WebInspector.ScriptsPanel.prototype = {
return selectedCallFrame.id;
},
- evaluateInSelectedCallFrame: function(code, updateInterface, objectGroup, callback)
+ evaluateInSelectedCallFrame: function(code, updateInterface, objectGroup, includeCommandLineAPI, callback)
{
var selectedCallFrame = this.sidebarPanes.callstack.selectedCallFrame;
if (!this._paused || !selectedCallFrame)
@@ -323,24 +323,15 @@ WebInspector.ScriptsPanel.prototype = {
if (typeof updateInterface === "undefined")
updateInterface = true;
- var self = this;
function updatingCallbackWrapper(result)
{
- callback(result);
- if (updateInterface)
- self.sidebarPanes.scopechain.update(selectedCallFrame);
- }
- this.doEvalInCallFrame(selectedCallFrame, code, objectGroup, updatingCallbackWrapper);
- },
-
- doEvalInCallFrame: function(callFrame, code, objectGroup, callback)
- {
- function evalCallback(result)
- {
- if (result)
+ if (result) {
callback(WebInspector.RemoteObject.fromPayload(result));
+ if (updateInterface)
+ this.sidebarPanes.scopechain.update(selectedCallFrame);
+ }
}
- InspectorBackend.evaluateOnCallFrame(callFrame.id, code, objectGroup, evalCallback);
+ InspectorBackend.evaluateOnCallFrame(selectedCallFrame.id, code, objectGroup, includeCommandLineAPI, updatingCallbackWrapper.bind(this));
},
_debuggerPaused: function(event)
diff --git a/Source/WebCore/inspector/front-end/SourceFrame.js b/Source/WebCore/inspector/front-end/SourceFrame.js
index ce3531f..821074a 100644
--- a/Source/WebCore/inspector/front-end/SourceFrame.js
+++ b/Source/WebCore/inspector/front-end/SourceFrame.js
@@ -759,7 +759,7 @@ WebInspector.SourceFrame.prototype = {
return;
showObjectPopup.call(this, result);
}
- WebInspector.panels.scripts.evaluateInSelectedCallFrame(element.textContent, false, this._popoverObjectGroup, evaluateCallback.bind(this));
+ WebInspector.panels.scripts.evaluateInSelectedCallFrame(element.textContent, false, this._popoverObjectGroup, false, evaluateCallback.bind(this));
},
_editBreakpointCondition: function(lineNumber, condition, callback)
diff --git a/Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js b/Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
index a01046b..a6f59ca 100644
--- a/Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
+++ b/Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
@@ -139,7 +139,7 @@ WebInspector.WatchExpressionsSection.prototype = {
if (!expression)
continue;
- WebInspector.console.evalInInspectedWindow("(" + expression + ")", this._watchObjectGroupId, appendResult.bind(this, expression, i));
+ WebInspector.console.evalInInspectedWindow("(" + expression + ")", this._watchObjectGroupId, false, appendResult.bind(this, expression, i));
}
// note this is setting the expansion of the tree, not the section;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list