Index: third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp |
index 4fa05adc46eba6575e978539639cb1299d3d0fd2..eac79f1e60c404c9a5bbb6ef7c1532b80321a4e9 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp |
@@ -258,8 +258,9 @@ |
void ScriptWrappableVisitor::MarkWrapper( |
const v8::PersistentBase<v8::Value>* handle) const { |
// The write barrier may try to mark a wrapper because cleanup is still |
- // delayed. Bail out in this case. |
- if (!m_tracingInProgress) |
+ // delayed. Bail out in this case. We also allow unconditional marking which |
+ // requires us to bail out here when tracing is not in progress. |
+ if (!tracing_in_progress_ || handle->IsEmpty()) |
return; |
handle->RegisterExternalReference(isolate_); |
} |