Changeset 49085 in webkit


Ignore:
Timestamp:
Oct 5, 2009 2:06:05 AM (15 years ago)
Author:
pfeldman@chromium.org
Message:

2009-10-04 Pavel Feldman <pfeldman@chromium.org>

Reviewed by Timothy Hatcher.

Web Inspector console stops working while JS in IFRAME is paused.

https://bugs.webkit.org/show_bug.cgi?id=29958

  • inspector/front-end/InjectedScript.js: (InjectedScript._evaluateOn): (InjectedScript.addInspectedNode): (InjectedScript._ensureCommandLineAPIInstalled):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r49084 r49085  
     12009-10-04  Pavel Feldman  <pfeldman@chromium.org>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        Web Inspector console stops working while JS in IFRAME is paused.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=29958
     8
     9        * inspector/front-end/InjectedScript.js:
     10        (InjectedScript._evaluateOn):
     11        (InjectedScript.addInspectedNode):
     12        (InjectedScript._ensureCommandLineAPIInstalled):
     13
    1142009-10-04  Pavel Feldman  <pfeldman@chromium.org>
    215
  • trunk/WebCore/inspector/front-end/InjectedScript.js

    r49084 r49085  
    554554InjectedScript._evaluateOn = function(evalFunction, object, expression)
    555555{
    556     InjectedScript._ensureCommandLineAPIInstalled();
     556    InjectedScript._ensureCommandLineAPIInstalled(evalFunction, object);
    557557    // Surround the expression in with statements to inject our command line API so that
    558558    // the window object properties still take more precedent than our API functions.
     
    573573        return false;
    574574
    575     InjectedScript._ensureCommandLineAPIInstalled();
     575    InjectedScript._ensureCommandLineAPIInstalled(InjectedScript._window().eval, InjectedScript._window());
    576576    var inspectedNodes = InjectedScript._window()._inspectorCommandLineAPI._inspectedNodes;
    577577    inspectedNodes.unshift(node);
     
    881881}
    882882
    883 InjectedScript._ensureCommandLineAPIInstalled = function(inspectedWindow)
    884 {
    885     var inspectedWindow = InjectedScript._window();
    886     if (inspectedWindow._inspectorCommandLineAPI)
     883InjectedScript._ensureCommandLineAPIInstalled = function(evalFunction, evalObject)
     884{
     885    if (evalFunction.call(evalObject, "window._inspectorCommandLineAPI"))
    887886        return;
    888    
    889     inspectedWindow.eval("window._inspectorCommandLineAPI = { \
     887    var inspectorCommandLineAPI = evalFunction.call(evalObject, "window._inspectorCommandLineAPI = { \
    890888        $: function() { return document.getElementById.apply(document, arguments) }, \
    891889        $$: function() { return document.querySelectorAll.apply(document, arguments) }, \
     
    914912    };");
    915913
    916     inspectedWindow._inspectorCommandLineAPI.clear = InspectorController.wrapCallback(InjectedScript._clearConsoleMessages);
    917     inspectedWindow._inspectorCommandLineAPI.inspect = InspectorController.wrapCallback(InjectedScript._inspectObject);
     914    inspectorCommandLineAPI.clear = InspectorController.wrapCallback(InjectedScript._clearConsoleMessages);
     915    inspectorCommandLineAPI.inspect = InspectorController.wrapCallback(InjectedScript._inspectObject);
    918916}
    919917
Note: See TracChangeset for help on using the changeset viewer.