Ignore:
Timestamp:
Nov 13, 2018, 8:57:33 PM (7 years ago)
Author:
[email protected]
Message:

TypeProfileLog::processLogEntries should stash away any pending exceptions and re-apply them to the VM
https://bugs.webkit.org/show_bug.cgi?id=191600

Reviewed by Mark Lam.

JSTests:

  • stress/type-profiler-log-should-defer-pending-exceptions.js: Added.

(foo):
(test):
(bar):

Source/JavaScriptCore:

processLogEntries will call into calculatedClassName, which will clear
any exceptions it encounters (it assumes that they're stack overflow exceptions).
However, this code may be called when an exception is already pending on the
VM (e.g, when we throw an exception in the DFG, we compile an OSR exit
offramp, which may compile a baseline codeblock, which will process
the type profiler log). To get around this, processLogEntires should stash
away and re-apply any pending exceptions.

  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):

  • dfg/DFGOperations.cpp:
  • inspector/agents/InspectorRuntimeAgent.cpp:

(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):

  • jit/JIT.cpp:

(JSC::JIT::doMainThreadPreparationBeforeCompile):

  • jit/JITOperations.cpp:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/TypeProfilerLog.cpp:

(JSC::TypeProfilerLog::processLogEntries):

  • runtime/TypeProfilerLog.h:
  • runtime/VM.cpp:

(JSC::VM::dumpTypeProfilerData):

  • runtime/VM.h:

(JSC::VM::DeferExceptionScope::DeferExceptionScope):

  • tools/JSDollarVM.cpp:

(JSC::functionFindTypeForExpression):
(JSC::functionReturnTypeFor):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp

    r234178 r238162  
    9898   
    9999    if (vm.typeProfiler())
    100         vm.typeProfilerLog()->processLogEntries("Preparing for DFG compilation."_s);
     100        vm.typeProfilerLog()->processLogEntries(vm, "Preparing for DFG compilation."_s);
    101101   
    102102    Ref<Plan> plan = adoptRef(
Note: See TracChangeset for help on using the changeset viewer.