Changeset 106662 in webkit


Ignore:
Timestamp:
Feb 3, 2012 8:20:32 AM (12 years ago)
Author:
yurys@chromium.org
Message:

inspector/debugger/pause-in-inline-script.html asserts in chromium debug
https://bugs.webkit.org/show_bug.cgi?id=77663

Source/WebCore:

Make ASSERT in MainResourceLoader not fail if debugger hits breakpoint
in the main resource inline script.

Reviewed by Pavel Feldman.

Test: inspector/debugger/pause-in-inline-script.html

  • bindings/js/ScriptDebugServer.h:

(WebCore::ScriptDebugServer::isPaused):
(ScriptDebugServer):

  • bindings/v8/ScriptDebugServer.h:

(ScriptDebugServer):

  • inspector/InspectorDebuggerAgent.cpp:

(WebCore::InspectorDebuggerAgent::didClearMainFrameWindowObject):
(WebCore):
(WebCore::InspectorDebuggerAgent::isPaused):

  • inspector/InspectorDebuggerAgent.h:

(InspectorDebuggerAgent):

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::isDebuggerPausedImpl):
(WebCore):

  • inspector/InspectorInstrumentation.h:

(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::isDebuggerPaused):
(WebCore):

  • loader/MainResourceLoader.cpp:

(WebCore::MainResourceLoader::didFinishLoading):

LayoutTests:

Reviewed by Pavel Feldman.

  • platform/chromium/test_expectations.txt: assert was fixed, remove custom expectation for inspector/debugger/pause-in-inline-script.html
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106657 r106662  
     12012-02-03  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        inspector/debugger/pause-in-inline-script.html asserts in chromium debug
     4        https://bugs.webkit.org/show_bug.cgi?id=77663
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * platform/chromium/test_expectations.txt: assert was fixed, remove
     9          custom expectation for inspector/debugger/pause-in-inline-script.html
     10
    1112012-01-27  Yury Semikhatsky  <yurys@chromium.org>
    212
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r106654 r106662  
    40484048
    40494049BUGWK77661 WIN LINUX : http/tests/inspector/indexeddb/database-structure.html = TEXT
    4050 BUGWK77663 WIN LINUX DEBUG : inspector/debugger/pause-in-inline-script.html = CRASH
    40514050
    40524051// Hitting ASSERT_NOT_REACHED in EventHandler::handleTouchEvent() as of r106554.
  • trunk/Source/WebCore/ChangeLog

    r106660 r106662  
     12012-02-03  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        inspector/debugger/pause-in-inline-script.html asserts in chromium debug
     4        https://bugs.webkit.org/show_bug.cgi?id=77663
     5
     6        Make ASSERT in MainResourceLoader not fail if debugger hits breakpoint
     7        in the main resource inline script.
     8
     9        Reviewed by Pavel Feldman.
     10
     11        Test: inspector/debugger/pause-in-inline-script.html
     12
     13        * bindings/js/ScriptDebugServer.h:
     14        (WebCore::ScriptDebugServer::isPaused):
     15        (ScriptDebugServer):
     16        * bindings/v8/ScriptDebugServer.h:
     17        (ScriptDebugServer):
     18        * inspector/InspectorDebuggerAgent.cpp:
     19        (WebCore::InspectorDebuggerAgent::didClearMainFrameWindowObject):
     20        (WebCore):
     21        (WebCore::InspectorDebuggerAgent::isPaused):
     22        * inspector/InspectorDebuggerAgent.h:
     23        (InspectorDebuggerAgent):
     24        * inspector/InspectorInstrumentation.cpp:
     25        (WebCore::InspectorInstrumentation::isDebuggerPausedImpl):
     26        (WebCore):
     27        * inspector/InspectorInstrumentation.h:
     28        (InspectorInstrumentation):
     29        (WebCore::InspectorInstrumentation::isDebuggerPaused):
     30        (WebCore):
     31        * loader/MainResourceLoader.cpp:
     32        (WebCore::MainResourceLoader::didFinishLoading):
     33
    1342012-02-03  Kentaro Hara  <haraken@chromium.org>
    235
  • trunk/Source/WebCore/bindings/js/ScriptDebugServer.h

    r101651 r106662  
    9191    virtual void recompileAllJSFunctions(Timer<ScriptDebugServer>* = 0) = 0;
    9292
     93    bool isPaused() { return m_paused; }
     94
    9395protected:
    9496    typedef HashSet<ScriptDebugListener*> ListenerSet;
  • trunk/Source/WebCore/bindings/v8/ScriptDebugServer.h

    r101651 r106662  
    9393    void runPendingTasks();
    9494
     95    bool isPaused();
     96
    9597protected:
    9698    ScriptDebugServer();
     
    113115    void ensureDebuggerScriptCompiled();
    114116   
    115     bool isPaused();
    116 
    117117    PauseOnExceptionsState m_pauseOnExceptionsState;
    118118    OwnHandle<v8::Object> m_debuggerScript;
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp

    r106541 r106662  
    186186}
    187187
     188bool InspectorDebuggerAgent::isPaused()
     189{
     190    return scriptDebugServer().isPaused();
     191}
     192
    188193static PassRefPtr<InspectorObject> buildObjectForBreakpointCookie(const String& url, int lineNumber, int columnNumber, const String& condition, bool isRegex)
    189194{
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h

    r106541 r106662  
    7878
    7979    void didClearMainFrameWindowObject();
     80    bool isPaused();
    8081
    8182    // Part of the protocol.
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp

    r106347 r106662  
    110110}
    111111
     112bool InspectorInstrumentation::isDebuggerPausedImpl(InstrumentingAgents* instrumentingAgents)
     113{
     114#if ENABLE(JAVASCRIPT_DEBUGGER)
     115    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDebuggerAgent())
     116        return debuggerAgent->isPaused();
     117#endif
     118    return false;
     119}
     120
    112121void InspectorInstrumentation::willInsertDOMNodeImpl(InstrumentingAgents* instrumentingAgents, Node* node, Node* parent)
    113122{
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.h

    r106347 r106662  
    8181public:
    8282    static void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld*);
     83    static bool isDebuggerPaused(Frame*);
    8384
    8485    static void willInsertDOMNode(Document*, Node*, Node* parent);
     
    229230#if ENABLE(INSPECTOR)
    230231    static void didClearWindowObjectInWorldImpl(InstrumentingAgents*, Frame*, DOMWrapperWorld*);
     232    static bool isDebuggerPausedImpl(InstrumentingAgents*);
    231233
    232234    static void willInsertDOMNodeImpl(InstrumentingAgents*, Node*, Node* parent);
     
    384386}
    385387
     388inline bool InspectorInstrumentation::isDebuggerPaused(Frame* frame)
     389{
     390#if ENABLE(INSPECTOR)
     391    FAST_RETURN_IF_NO_FRONTENDS(false);
     392    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
     393        return isDebuggerPausedImpl(instrumentingAgents);
     394#endif
     395    return false;
     396}
     397
    386398inline void InspectorInstrumentation::willInsertDOMNode(Document* document, Node* node, Node* parent)
    387399{
  • trunk/Source/WebCore/loader/MainResourceLoader.cpp

    r104803 r106662  
    470470    // See <rdar://problem/6304600> for more details.
    471471#if !USE(CF)
    472     ASSERT(shouldLoadAsEmptyDocument(frameLoader()->activeDocumentLoader()->url()) || !defersLoading());
     472    ASSERT(shouldLoadAsEmptyDocument(frameLoader()->activeDocumentLoader()->url()) || !defersLoading() || InspectorInstrumentation::isDebuggerPaused(m_frame.get()));
    473473#endif
    474474
Note: See TracChangeset for help on using the changeset viewer.