Ignore:
Timestamp:
Jan 24, 2014, 1:27:42 PM (11 years ago)
Author:
Joseph Pecoraro
Message:

fast/profiler tests ASSERTing after moving recompileAllJSFunctions off a timer
https://bugs.webkit.org/show_bug.cgi?id=127566

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

Make the VM handle recompilation as soon as possible after it is requested.

  • debugger/Debugger.cpp:

(JSC::Debugger::recompileAllJSFunctions):
When in a JavaScript stack, mark for recompilation when possible.

  • runtime/VMEntryScope.h:

(JSC::VMEntryScope::setRecompilationNeeded):

  • runtime/VMEntryScope.cpp:

(JSC::VMEntryScope::VMEntryScope):
(JSC::VMEntryScope::~VMEntryScope):
Handle recompilation when the top VMEntryScope is popped.
Pass the needs recompilation flag up the stack if needed.

Source/WebCore:

Covered by existing tests.

  • testing/Internals.cpp:

(WebCore::Internals::closeDummyInspectorFrontend):
Now that we don't have to fake that this is a page being destroyed to
avoid recompilation. Use the InspectorDestroyed reason.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/debugger/Debugger.cpp

    r162711 r162720  
    323323    // If JavaScript is running, it's not safe to recompile, since we'll end
    324324    // up throwing away code that is live on the stack.
    325     ASSERT(!vm->entryScope);
    326     if (vm->entryScope)
    327         return;
    328    
     325    if (vm->entryScope) {
     326        vm->entryScope->setRecompilationNeeded(true);
     327        return;
     328    }
     329
    329330    vm->prepareToDiscardCode();
    330331
Note: See TracChangeset for help on using the changeset viewer.