Initialize context if a frame had an empty global object.

When a frame navigates to a new page, the global object is detached from its
old context. However, if the new page has no JavaScript, its new context is not initialized. If another page kept a reference to the global object of the old page and tries to access the new page, it will fail because the context of new page is not initialized so the global object is connected to a real context.
diff --git a/V8Binding/binding/v8_proxy.cpp b/V8Binding/binding/v8_proxy.cpp
index c0de3c6..8675d6f 100644
--- a/V8Binding/binding/v8_proxy.cpp
+++ b/V8Binding/binding/v8_proxy.cpp
@@ -2011,9 +2011,11 @@
     if (!m_frame->document())
         return;
 
-    if (m_context.IsEmpty())
+    if (m_global.IsEmpty())
         return;
 
+    InitContextIfNeeded();
+
     // We have a new document and we need to update the cache.
     UpdateDocumentWrapperCache();