Update V8 to r7427: Initial merge by git

As required by WebKit r82507

Change-Id: I7ae83ef3f689356043b4929255b7c1dd31d8c5df
diff --git a/src/d8.cc b/src/d8.cc
index 349ec90..7de82b7 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -29,6 +29,8 @@
 #include <stdlib.h>
 #include <errno.h>
 
+#include "v8.h"
+
 #include "d8.h"
 #include "d8-debug.h"
 #include "debug.h"
@@ -441,24 +443,25 @@
 
   i::JSArguments js_args = i::FLAG_js_arguments;
   i::Handle<i::FixedArray> arguments_array =
-      i::Factory::NewFixedArray(js_args.argc());
+      FACTORY->NewFixedArray(js_args.argc());
   for (int j = 0; j < js_args.argc(); j++) {
     i::Handle<i::String> arg =
-        i::Factory::NewStringFromUtf8(i::CStrVector(js_args[j]));
+        FACTORY->NewStringFromUtf8(i::CStrVector(js_args[j]));
     arguments_array->set(j, *arg);
   }
   i::Handle<i::JSArray> arguments_jsarray =
-      i::Factory::NewJSArrayWithElements(arguments_array);
+      FACTORY->NewJSArrayWithElements(arguments_array);
   global_template->Set(String::New("arguments"),
                        Utils::ToLocal(arguments_jsarray));
 
 #ifdef ENABLE_DEBUGGER_SUPPORT
   // Install the debugger object in the utility scope
-  i::Debug::Load();
-  i::Handle<i::JSObject> debug
-      = i::Handle<i::JSObject>(i::Debug::debug_context()->global());
+  i::Debug* debug = i::Isolate::Current()->debug();
+  debug->Load();
+  i::Handle<i::JSObject> js_debug
+      = i::Handle<i::JSObject>(debug->debug_context()->global());
   utility_context_->Global()->Set(String::New("$debug"),
-                                  Utils::ToLocal(debug));
+                                  Utils::ToLocal(js_debug));
 #endif
 
   // Run the d8 shell utility script in the utility context
@@ -490,7 +493,7 @@
 
 #ifdef ENABLE_DEBUGGER_SUPPORT
   // Set the security token of the debug context to allow access.
-  i::Debug::debug_context()->set_security_token(i::Heap::undefined_value());
+  debug->debug_context()->set_security_token(HEAP->undefined_value());
 
   // Start the debugger agent if requested.
   if (i::FLAG_debugger_agent) {
@@ -606,8 +609,8 @@
 
 class ShellThread : public i::Thread {
  public:
-  ShellThread(int no, i::Vector<const char> files)
-    : Thread("d8:ShellThread"),
+  ShellThread(i::Isolate* isolate, int no, i::Vector<const char> files)
+    : Thread(isolate, "d8:ShellThread"),
       no_(no), files_(files) { }
   virtual void Run();
  private:
@@ -739,7 +742,8 @@
         const char* files = ReadChars(argv[++i], &size);
         if (files == NULL) return 1;
         ShellThread* thread =
-            new ShellThread(threads.length(),
+            new ShellThread(i::Isolate::Current(),
+                            threads.length(),
                             i::Vector<const char>(files, size));
         thread->Start();
         threads.Add(thread);