Changeset 191081 in webkit


Ignore:
Timestamp:
Oct 14, 2015 8:53:49 PM (9 years ago)
Author:
commit-queue@webkit.org
Message:

REGRESSION: Web Inspector hangs for many seconds when trying to reload page
https://bugs.webkit.org/show_bug.cgi?id=150065

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2015-10-14
Reviewed by Mark Lam.

When debugging Web Pages, the same Debugger (PageScriptDebugServer) is
attached to each of the different JSGlobalObjects on the page. This could
mean multiple frames or isolated scripting contexts. Therefore we should
only need to send sourceParsed events to the frontend for scripts within
this new JSGlobalObject, not any JSGlobalObject that has this debugger.

  • debugger/Debugger.cpp:

(JSC::Debugger::attach):
Only send sourceParsed events for Scripts in this JSGlobalObject.

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r191079 r191081  
     12015-10-14  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        REGRESSION: Web Inspector hangs for many seconds when trying to reload page
     4        https://bugs.webkit.org/show_bug.cgi?id=150065
     5
     6        Reviewed by Mark Lam.
     7
     8        When debugging Web Pages, the same Debugger (PageScriptDebugServer) is
     9        attached to each of the different JSGlobalObjects on the page. This could
     10        mean multiple frames or isolated scripting contexts. Therefore we should
     11        only need to send sourceParsed events to the frontend for scripts within
     12        this new JSGlobalObject, not any JSGlobalObject that has this debugger.
     13
     14        * debugger/Debugger.cpp:
     15        (JSC::Debugger::attach):
     16        Only send sourceParsed events for Scripts in this JSGlobalObject.
     17
    1182015-10-14  Joseph Pecoraro  <pecoraro@apple.com>
    219
  • trunk/Source/JavaScriptCore/debugger/Debugger.cpp

    r190542 r191081  
    4242struct GatherSourceProviders : public MarkedBlock::VoidFunctor {
    4343    HashSet<SourceProvider*> sourceProviders;
    44     JSC::Debugger* m_debugger;
    45 
    46     GatherSourceProviders(JSC::Debugger* debugger)
    47         : m_debugger(debugger) { }
     44    JSGlobalObject* m_globalObject;
     45
     46    GatherSourceProviders(JSGlobalObject* globalObject)
     47        : m_globalObject(globalObject) { }
    4848
    4949    IterationStatus operator()(JSCell* cell)
     
    5353            return IterationStatus::Continue;
    5454
    55         if (function->scope()->globalObject()->debugger() != m_debugger)
     55        if (function->scope()->globalObject() != m_globalObject)
    5656            return IterationStatus::Continue;
    5757
     
    144144    m_globalObjects.add(globalObject);
    145145
    146     // Call sourceParsed() because it will execute JavaScript in the inspector.
    147     GatherSourceProviders gatherSourceProviders(this);
     146    // Call sourceParsed because it will execute JavaScript in the inspector.
     147    GatherSourceProviders gatherSourceProviders(globalObject);
    148148    {
    149149        HeapIterationScope iterationScope(m_vm.heap);
Note: See TracChangeset for help on using the changeset viewer.