Index: Source/core/testing/v8/WebCoreTestSupport.cpp |
diff --git a/Source/core/testing/v8/WebCoreTestSupport.cpp b/Source/core/testing/v8/WebCoreTestSupport.cpp |
index e0553ab5f7c7f5c6d795e93db179c9cf4cb1d91f..69ea28d3902de54d80f966c94dfb8674ff380916 100644 |
--- a/Source/core/testing/v8/WebCoreTestSupport.cpp |
+++ b/Source/core/testing/v8/WebCoreTestSupport.cpp |
@@ -41,6 +41,10 @@ namespace WebCoreTestSupport { |
void injectInternalsObject(v8::Local<v8::Context> context) |
{ |
+ // This can happen if no JavaScript was used in the main frame. |
+ if (context.IsEmpty()) |
+ return; |
+ |
v8::Context::Scope contextScope(context); |
v8::HandleScope scope(context->GetIsolate()); |
ExecutionContext* scriptContext = currentExecutionContext(context->GetIsolate()); |