Changeset 87280 in webkit


Ignore:
Timestamp:
May 25, 2011 2:03:11 AM (13 years ago)
Author:
podivilov@chromium.org
Message:

2011-05-24 Pavel Podivilov <podivilov@chromium.org>

Reviewed by Yury Semikhatsky.

Web Inspector: inspected page crashes when call stack is empty after live edit.
https://bugs.webkit.org/show_bug.cgi?id=61364

  • inspector/debugger/live-edit-expected.txt:
  • inspector/debugger/live-edit.html:
  • platform/chromium/test_expectations.txt:

2011-05-24 Pavel Podivilov <podivilov@chromium.org>

Reviewed by Yury Semikhatsky.

Web Inspector: inspected page crashes when call stack is empty after live edit.
https://bugs.webkit.org/show_bug.cgi?id=61364

  • bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::currentCallFrame):
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r87279 r87280  
     12011-05-24  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: inspected page crashes when call stack is empty after live edit.
     6        https://bugs.webkit.org/show_bug.cgi?id=61364
     7
     8        * inspector/debugger/live-edit-expected.txt:
     9        * inspector/debugger/live-edit.html:
     10        * platform/chromium/test_expectations.txt:
     11
    1122011-05-25  Mads Ager  <ager@chromium.org>
    213
  • trunk/LayoutTests/inspector/debugger/live-edit-expected.txt

    r83294 r87280  
    1414Running: testLiveEditWhenPaused
    1515Script execution paused.
     16Script execution resumed.
     17
     18Running: testNoCrashWhenOnlyOneFunctionOnStack
     19Script execution paused.
    1620Call stack:
    1721    0) f1 (edit-me-when-paused.js:13)
    18     1)  (:1)
    19     2) eval ((internal script):146)
    20     3) InjectedScript._evaluateOn (:283)
    21     4) InjectedScript._evaluateAndWrap (:265)
    22     5) InjectedScript.evaluate (:245)
     22Script execution resumed.
     23Script execution paused.
    2324Script execution resumed.
    2425
  • trunk/LayoutTests/inspector/debugger/live-edit.html

    r83585 r87280  
    5252            function didEditScriptSource()
    5353            {
    54                 InspectorTest.captureStackTrace(WebInspector.debuggerModel.callFrames);
    5554                InspectorTest.resumeExecution();
    5655            }
     
    6059                InspectorTest.assertEquals("3", result.description, "edited function returns wrong result");
    6160                next();
     61            }
     62        },
     63
     64        function testNoCrashWhenOnlyOneFunctionOnStack(next)
     65        {
     66            InspectorTest.showScriptSource("edit-me-when-paused.js", didShowScriptSource);
     67
     68            function didShowScriptSource(sourceFrame)
     69            {
     70                InspectorTest.waitUntilPaused(paused);
     71                InspectorTest.evaluateInPage("setTimeout(f1, 0)");
     72            }
     73
     74            function paused(callFrames)
     75            {
     76                InspectorTest.captureStackTrace(callFrames);
     77                replaceInSource(panel.visibleView, "debugger;", "debugger;\n", didEditScriptSource);
     78            }
     79
     80            function didEditScriptSource()
     81            {
     82                InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(InspectorTest, InspectorTest.resumeExecution.bind(InspectorTest, next)));
    6283            }
    6384        },
     
    92113        InspectorTest.addSniffer(WebInspector.debuggerModel, "_didEditScriptSource", callback);
    93114        sourceFrame._textViewer._mainPanel.readOnly = false;
    94         sourceFrame.startEditing();
     115        sourceFrame.beforeTextChanged();
    95116        var oldRange, newRange;
    96117        var lines = sourceFrame._textModel._lines;
     
    106127            break;
    107128        }
    108         sourceFrame.endEditing(oldRange, newRange);
     129        sourceFrame.afterTextChanged(oldRange, newRange);
    109130        sourceFrame._textViewer._commitEditing();
    110131    }
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r87268 r87280  
    685685
    686686BUGCR77630 WIN LINUX DEBUG SLOW : inspector/debugger/debugger-activation-crash.html = PASS TEXT
    687 
    688 BUGWK60106 DEBUG WIN LINUX : inspector/debugger/live-edit.html = TEXT TIMEOUT PASS
    689 BUGWK60106 RELEASE LINUX : inspector/debugger/live-edit.html = TEXT PASS
    690687
    691688BUGWK60107 WIN LINUX : inspector/console/console-object-constructor-name.html = TEXT PASS TIMEOUT
  • trunk/Source/WebCore/ChangeLog

    r87278 r87280  
     12011-05-24  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: inspected page crashes when call stack is empty after live edit.
     6        https://bugs.webkit.org/show_bug.cgi?id=61364
     7
     8        * bindings/v8/ScriptDebugServer.cpp:
     9        (WebCore::ScriptDebugServer::currentCallFrame):
     10
    1112011-05-23  Yury Semikhatsky  <yurys@chromium.org>
    212
  • trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp

    r86756 r87280  
    249249    v8::Handle<v8::Value> argv[] = { m_executionState.get() };
    250250    v8::Handle<v8::Value> currentCallFrameV8 = currentCallFrameFunction->Call(m_debuggerScript.get(), 1, argv);
     251    if (!currentCallFrameV8->IsObject())
     252        return ScriptValue(v8::Null());
    251253    RefPtr<JavaScriptCallFrame> currentCallFrame = JavaScriptCallFrame::create(v8::Debug::GetDebugContext(), v8::Handle<v8::Object>::Cast(currentCallFrameV8));
    252254    v8::Context::Scope contextScope(m_pausedContext);
Note: See TracChangeset for help on using the changeset viewer.