[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

Gustavo Noronha Silva gns at gnome.org
Thu Apr 8 02:24:44 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 41da93f93100cb4030341a1879cdeb1791f7b8d9
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Mar 28 02:32:49 2010 +0000

    2010-03-27  Dmitry Gorbik  <socket.h at gmail.com>
    
            Reviewed by Pavel Feldman.
    
            Fix the regression caused by r28078: a global variable
            definition masks a local one in an inspector console
            https://bugs.webkit.org/show_bug.cgi?id=32442
    
            * inspector/front-end/InjectedScript.js:
            (injectedScriptConstructor):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56676 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index bfb62ff..84ede57 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-03-27  Dmitry Gorbik  <socket.h at gmail.com>
+
+        Reviewed by Pavel Feldman.
+
+        Fix the regression caused by r28078: a global variable
+        definition masks a local one in an inspector console
+        https://bugs.webkit.org/show_bug.cgi?id=32442
+
+        * inspector/front-end/InjectedScript.js:
+        (injectedScriptConstructor):
+
 2010-03-24  Mark Rowe  <mrowe at apple.com>
 
         Revert the portion of r56489 that dealt with port zero as it introduced some test failures.
diff --git a/WebCore/inspector/front-end/InjectedScript.js b/WebCore/inspector/front-end/InjectedScript.js
index 8c7d48e..58492aa 100644
--- a/WebCore/inspector/front-end/InjectedScript.js
+++ b/WebCore/inspector/front-end/InjectedScript.js
@@ -234,7 +234,7 @@ InjectedScript.getCompletions = function(expression, includeInspectorCommandLine
             if (!callFrame)
                 return props;
             if (expression)
-                expressionResult = InjectedScript._evaluateOn(callFrame.evaluate, callFrame, expression);
+                expressionResult = InjectedScript._evaluateOn(callFrame.evaluate, callFrame, expression, true);
             else {
                 // Evaluate into properties in scope of the selected call frame.
                 var scopeChain = callFrame.scopeChain;
@@ -262,11 +262,11 @@ InjectedScript.evaluate = function(expression, objectGroup)
     return InjectedScript._evaluateAndWrap(InjectedScript._window().eval, InjectedScript._window(), expression, objectGroup);
 }
 
-InjectedScript._evaluateAndWrap = function(evalFunction, object, expression, objectGroup)
+InjectedScript._evaluateAndWrap = function(evalFunction, object, expression, objectGroup, dontUseCommandLineAPI)
 {
     var result = {};
     try {
-        result.value = InjectedScript.wrapObject(InjectedScript._evaluateOn(evalFunction, object, expression), objectGroup);
+        result.value = InjectedScript.wrapObject(InjectedScript._evaluateOn(evalFunction, object, expression, dontUseCommandLineAPI), objectGroup);
 
         // Handle error that might have happened while describing result.
         if (result.value.errorText) {
@@ -280,12 +280,14 @@ InjectedScript._evaluateAndWrap = function(evalFunction, object, expression, obj
     return result;
 }
 
-InjectedScript._evaluateOn = function(evalFunction, object, expression)
+InjectedScript._evaluateOn = function(evalFunction, object, expression, dontUseCommandLineAPI)
 {
     InjectedScript._ensureCommandLineAPIInstalled(evalFunction, object);
     // Surround the expression in with statements to inject our command line API so that
     // the window object properties still take more precedent than our API functions.
-    expression = "with (window.console._inspectorCommandLineAPI) { with (window) {\n" + expression + "\n} }";
+    if (!dontUseCommandLineAPI)
+        expression = "with (window.console._inspectorCommandLineAPI) { with (window) {\n" + expression + "\n} }";
+
     var value = evalFunction.call(object, expression);
 
     // When evaluating on call frame error is not thrown, but returned as a value.
@@ -578,7 +580,7 @@ InjectedScript.evaluateInCallFrame = function(callFrameId, code, objectGroup)
     var callFrame = InjectedScript._callFrameForId(callFrameId);
     if (!callFrame)
         return false;
-    return InjectedScript._evaluateAndWrap(callFrame.evaluate, callFrame, code, objectGroup);
+    return InjectedScript._evaluateAndWrap(callFrame.evaluate, callFrame, code, objectGroup, true);
 }
 
 InjectedScript._callFrameForId = function(id)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list