Index: content/renderer/mojo_bindings_controller.cc |
diff --git a/content/renderer/mojo_bindings_controller.cc b/content/renderer/mojo_bindings_controller.cc |
index 2214254a0341703b7680ecbb6252a3efbf756da8..84a61b2bcd98c004e54e7fbc67f6536ad200458c 100644 |
--- a/content/renderer/mojo_bindings_controller.cc |
+++ b/content/renderer/mojo_bindings_controller.cc |
@@ -71,17 +71,17 @@ void MojoBindingsController::WillReleaseScriptContext( |
DestroyContextState(context); |
} |
-void MojoBindingsController::DidFinishDocumentLoad() { |
+void MojoBindingsController::RunScriptsAtDocumentStart() { |
+ CreateContextState(); |
+} |
+ |
+void MojoBindingsController::RunScriptsAtDocumentReady() { |
v8::HandleScope handle_scope(blink::mainThreadIsolate()); |
MojoContextState* state = GetContextState(); |
if (state) |
state->Run(); |
} |
-void MojoBindingsController::DidCreateDocumentElement() { |
- CreateContextState(); |
-} |
- |
void MojoBindingsController::DidClearWindowObject() { |
// NOTE: this function may be called early on twice. From the constructor |
// mainWorldScriptContext() may trigger this to be called. If we are created |