Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(740)

Unified Diff: Source/core/testing/v8/WebCoreTestSupport.cpp

Issue 263583002: Reland: Do not initialize v8::Context on |ScriptController::updateDocument|. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: simplify Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/ScriptController.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « Source/bindings/v8/ScriptController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698