Cherry pick http://codereview.chromium.org/1207003/show

Implement support for reattaching a global object to a context. This
can be used to use the same global object for different contexts at
different points in time.

Needed to fix b: 2533219

Change-Id: Ib3b0d35f6ce3e0a5f4b8e54561ba2e99a9ab0ab1
diff --git a/include/v8.h b/include/v8.h
index c911cc7..9c80ce2 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -2633,6 +2633,18 @@
    */
   void DetachGlobal();
 
+  /**
+   * Reattaches a global object to a context.  This can be used to
+   * restore the connection between a global object and a context
+   * after DetachGlobal has been called.
+   *
+   * \param global_object The global object to reattach to the
+   *   context.  For this to work, the global object must be the global
+   *   object that was associated with this context before a call to
+   *   DetachGlobal.
+   */
+  void ReattachGlobal(Handle<Object> global_object);
+
   /** Creates a new context. */
   static Persistent<Context> New(
       ExtensionConfiguration* extensions = NULL,