Changeset 98346 in webkit


Ignore:
Timestamp:
Oct 25, 2011 8:06:00 AM (12 years ago)
Author:
vsevik@chromium.org
Message:

Web Inspector: Debugger fails when there is an invalid watch expression.
https://bugs.webkit.org/show_bug.cgi?id=70718

Reviewed by Pavel Feldman.

Source/WebCore:

Test: inspector/debugger/watch-expressions-panel-switch.html

  • inspector/front-end/ScriptsPanel.js:

(WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):

LayoutTests:

  • inspector/debugger/error-in-watch-expressions.html:
  • inspector/debugger/watch-expressions-panel-switch-expected.txt: Added.
  • inspector/debugger/watch-expressions-panel-switch.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r98345 r98346  
     12011-10-25  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Web Inspector: Debugger fails when there is an invalid watch expression.
     4        https://bugs.webkit.org/show_bug.cgi?id=70718
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * inspector/debugger/error-in-watch-expressions.html:
     9        * inspector/debugger/watch-expressions-panel-switch-expected.txt: Added.
     10        * inspector/debugger/watch-expressions-panel-switch.html: Added.
     11
    1122011-10-24  Pavel Podivilov  <podivilov@chromium.org>
    213
  • trunk/LayoutTests/inspector/debugger/error-in-watch-expressions.html

    r88941 r98346  
    88var test = function()
    99{
     10    // We need to initialize scripts panel so that watch expressions section is created.
     11    WebInspector.showPanel("scripts");
     12
    1013    var watchExpressionsSection = WebInspector.panels.scripts.sidebarPanes.watchExpressions.section;
    11     watchExpressionsSection.addExpression();
    12     watchExpressionsSection.watchExpressions[0] = "#$%";
     14    watchExpressionsSection.watchExpressions = [];
     15    watchExpressionsSection.watchExpressions.push("#$%");
    1316    watchExpressionsSection.update();
     17
    1418    InspectorTest.runAfterPendingDispatches(step1);
    1519
     
    1721    {
    1822        InspectorTest.addResult(watchExpressionsSection.element.innerHTML.indexOf("watch-expressions-error-level") !== -1 ? "SUCCESS" : "FAILED");
     23
     24        // Clear watch expressions after execution.
     25        watchExpressionsSection.watchExpressions = [];
     26        watchExpressionsSection.update();
     27
    1928        InspectorTest.completeTest();
    2029    }
  • trunk/Source/WebCore/ChangeLog

    r98345 r98346  
     12011-10-25  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Web Inspector: Debugger fails when there is an invalid watch expression.
     4        https://bugs.webkit.org/show_bug.cgi?id=70718
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Test: inspector/debugger/watch-expressions-panel-switch.html
     9
     10        * inspector/front-end/ScriptsPanel.js:
     11        (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
     12
    1132011-10-24  Pavel Podivilov  <podivilov@chromium.org>
    214
  • trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js

    r98233 r98346  
    468468        }
    469469        var selectedCallFrame = this._presentationModel.selectedCallFrame;
    470         selectedCallFrame.evaluate(code, objectGroup, includeCommandLineAPI, returnByValue, didEvaluate.bind(this));
     470        if (selectedCallFrame)
     471            selectedCallFrame.evaluate(code, objectGroup, includeCommandLineAPI, returnByValue, didEvaluate.bind(this));
    471472    },
    472473
Note: See TracChangeset for help on using the changeset viewer.