Commit ba1d747d authored by leszeks's avatar leszeks Committed by Commit bot

[ast] Temporarily allow handle dereference for debug printing

There is a print in AstNumbering which needs to dereference the string
containing the function name, which clashes with the disallowed handle
reference scope used to allow ast-numbering to run off-thread.

This could be fixed by pushing the print out of this function, and
somehow propagating disable_crankshaft_reason out of the visitor, but in
reality this check will soon be removed anyway, and until it is this
function will be on the main thread, so we may as well just hack it.

Review-Url: https://codereview.chromium.org/2653953006
Cr-Commit-Position: refs/heads/master@{#42711}
parent 70fdac9a
......@@ -649,6 +649,13 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) {
if (FLAG_trace_opt) {
if (disable_crankshaft_reason_ != kNoReason) {
// TODO(leszeks): This is a quick'n'dirty fix to allow the debug name of
// the function to be accessed in the below print. This DCHECK will fail
// if we move ast numbering off the main thread, but that won't be before
// we remove FCG, in which case this entire check isn't necessary anyway.
AllowHandleDereference allow_deref;
DCHECK(!node->debug_name().is_null());
PrintF("[enforcing Ignition and TurboFan for %s because: %s\n",
node->debug_name()->ToCString().get(),
GetBailoutReason(disable_crankshaft_reason_));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment