Bugfix: allow handle dereference only when we have a valid hydrogen graph or lithium chunk.

BUG=

Review URL: https://codereview.chromium.org/12389075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13793 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e8145cab
......@@ -10511,11 +10511,13 @@ void HTracer::TraceCompilation(CompilationInfo* info) {
void HTracer::TraceLithium(const char* name, LChunk* chunk) {
AllowHandleDereference allow_handle_deref(chunk->graph()->isolate());
Trace(name, chunk->graph(), chunk);
}
void HTracer::TraceHydrogen(const char* name, HGraph* graph) {
AllowHandleDereference allow_handle_deref(graph->isolate());
Trace(name, graph, NULL);
}
......@@ -10823,7 +10825,6 @@ void HPhase::End() const {
// phase name matches the command line parameter FLAG_trace_phase.
if (FLAG_trace_hydrogen &&
OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL) {
AllowHandleDereference allow_handle_deref(graph_->isolate());
if (graph_ != NULL) HTracer::Instance()->TraceHydrogen(name_, graph_);
if (chunk_ != NULL) HTracer::Instance()->TraceLithium(name_, chunk_);
if (allocator_ != NULL) {
......
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