Version 3.17.11
Added a version of the v8::HandleScope constructor with an v8::Isolate parameter and made AdjustAmountOfExternalAllocatedMemory an instance method of v8::Isolate. (issue 2487)
Fixed two register allocator bugs (off-by-one error/failure propagation). (issue 2576)
Fixed huge heap snapshot when a heavily shared context has many variables. (Chromium issue 145687)
Performance and stability improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@13956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/isolate.cc b/src/isolate.cc
index 5f7b3f2..fb9cab1 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -944,11 +944,7 @@
if (decision != UNKNOWN) return decision == YES;
// Get named access check callback
- // TODO(dcarney): revert
- Map* map = receiver->map();
- CHECK(map->IsMap());
- CHECK(map->constructor()->IsJSFunction());
- JSFunction* constructor = JSFunction::cast(map->constructor());
+ JSFunction* constructor = JSFunction::cast(receiver->map()->constructor());
if (!constructor->shared()->IsApiFunction()) return false;
Object* data_obj =
@@ -1713,7 +1709,8 @@
memset(code_kind_statistics_, 0,
sizeof(code_kind_statistics_[0]) * Code::NUMBER_OF_KINDS);
- allow_handle_deref_ = true;
+ allow_compiler_thread_handle_deref_ = true;
+ allow_execution_thread_handle_deref_ = true;
#endif
#ifdef ENABLE_DEBUGGER_SUPPORT
@@ -2321,6 +2318,33 @@
}
+#ifdef DEBUG
+bool Isolate::AllowHandleDereference() {
+ if (allow_execution_thread_handle_deref_ &&
+ allow_compiler_thread_handle_deref_) {
+ // Short-cut to avoid polling thread id.
+ return true;
+ }
+ if (FLAG_parallel_recompilation &&
+ optimizing_compiler_thread()->IsOptimizerThread()) {
+ return allow_compiler_thread_handle_deref_;
+ } else {
+ return allow_execution_thread_handle_deref_;
+ }
+}
+
+
+void Isolate::SetAllowHandleDereference(bool allow) {
+ if (FLAG_parallel_recompilation &&
+ optimizing_compiler_thread()->IsOptimizerThread()) {
+ allow_compiler_thread_handle_deref_ = allow;
+ } else {
+ allow_execution_thread_handle_deref_ = allow;
+ }
+}
+#endif
+
+
HStatistics* Isolate::GetHStatistics() {
if (hstatistics() == NULL) set_hstatistics(new HStatistics());
return hstatistics();