Version 3.16.6

Made the Isolate parameter mandatory in Locker and Unlocker classes. (issue 2487)

Avoid pointer underflow in CopyCharsUnsigned. (issue 2493)

Generate shim headers when using system v8. (Chromium issue 165264)

Fixed arguments materialization for inlined apply(). (issue 2489)

Sync'ed laziness between BuildFunctionInfo and MakeFunctionInfo. (Chromium issue 147497)

Added sanity check to CodeFlusher::AddCandidate. (Chromium issue 169209)

Performance and stability improvements on all platforms.

git-svn-id: http://v8.googlecode.com/svn/trunk@13439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/isolate.cc b/src/isolate.cc
index 2044805..8bcceab 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -408,9 +408,9 @@
 }
 
 
-Isolate* Isolate::GetDefaultIsolateForLocking() {
+v8::Isolate* Isolate::GetDefaultIsolateForLocking() {
   EnsureDefaultIsolate();
-  return default_isolate_;
+  return reinterpret_cast<v8::Isolate*>(default_isolate_);
 }
 
 
@@ -923,7 +923,11 @@
   if (decision != UNKNOWN) return decision == YES;
 
   // Get named access check callback
-  JSFunction* constructor = JSFunction::cast(receiver->map()->constructor());
+  // TODO(dcarney): revert
+  Map* map = receiver->map();
+  CHECK(map->IsMap());
+  CHECK(map->constructor()->IsJSFunction());
+  JSFunction* constructor = JSFunction::cast(map->constructor());
   if (!constructor->shared()->IsApiFunction()) return false;
 
   Object* data_obj =
@@ -1738,7 +1742,7 @@
     delete deoptimizer_data_;
     deoptimizer_data_ = NULL;
     if (FLAG_preemption) {
-      v8::Locker locker;
+      v8::Locker locker(reinterpret_cast<v8::Isolate*>(this));
       v8::Locker::StopPreemption();
     }
     builtins_.TearDown();
@@ -2029,7 +2033,7 @@
   }
 
   if (FLAG_preemption) {
-    v8::Locker locker;
+    v8::Locker locker(reinterpret_cast<v8::Isolate*>(this));
     v8::Locker::StartPreemption(100);
   }