Revision: 16552
Author:   dcar...@chromium.org
Date:     Thu Sep  5 11:27:22 2013 UTC
Log:      remove most Isolate::Current asserts

R=svenpa...@chromium.org
BUG=

Review URL: https://codereview.chromium.org/23493019
http://code.google.com/p/v8/source/detail?r=16552

Modified:
 /branches/bleeding_edge/src/builtins.cc
 /branches/bleeding_edge/src/compiler.h
 /branches/bleeding_edge/src/debug.cc
 /branches/bleeding_edge/src/debug.h
 /branches/bleeding_edge/src/ic-inl.h
 /branches/bleeding_edge/src/isolate.cc
 /branches/bleeding_edge/src/mark-compact.cc
 /branches/bleeding_edge/src/objects-inl.h
 /branches/bleeding_edge/src/objects.h
 /branches/bleeding_edge/src/regexp-macro-assembler.cc
 /branches/bleeding_edge/src/regexp-stack.cc
 /branches/bleeding_edge/src/runtime.cc
 /branches/bleeding_edge/src/stub-cache.cc
 /branches/bleeding_edge/src/v8.cc

=======================================
--- /branches/bleeding_edge/src/builtins.cc     Thu Sep  5 08:48:34 2013 UTC
+++ /branches/bleeding_edge/src/builtins.cc     Thu Sep  5 11:27:22 2013 UTC
@@ -132,7 +132,6 @@
   MUST_USE_RESULT static MaybeObject* Builtin_##name(            \
       int args_length, Object** args_object, Isolate* isolate) { \
     name##ArgumentsType args(args_length, args_object);          \
-    ASSERT(isolate == Isolate::Current());                       \
     args.Verify();                                               \
     return Builtin_Impl_##name(args, isolate);                   \
   }                                                              \
=======================================
--- /branches/bleeding_edge/src/compiler.h      Wed Sep  4 12:55:59 2013 UTC
+++ /branches/bleeding_edge/src/compiler.h      Thu Sep  5 11:27:22 2013 UTC
@@ -60,11 +60,10 @@
   CompilationInfo(Handle<JSFunction> closure, Zone* zone);
   virtual ~CompilationInfo();

-  Isolate* isolate() {
-    ASSERT(Isolate::Current() == isolate_);
+  Isolate* isolate() const {
     return isolate_;
   }
-  Zone* zone() { return zone_; }
+  Zone* zone() const { return zone_; }
   bool is_lazy() const { return IsLazy::decode(flags_); }
   bool is_eval() const { return IsEval::decode(flags_); }
   bool is_global() const { return IsGlobal::decode(flags_); }
=======================================
--- /branches/bleeding_edge/src/debug.cc        Thu Sep  5 08:48:34 2013 UTC
+++ /branches/bleeding_edge/src/debug.cc        Thu Sep  5 11:27:22 2013 UTC
@@ -3422,7 +3422,6 @@

 bool Debugger::StartAgent(const char* name, int port,
                           bool wait_for_connection) {
-  ASSERT(Isolate::Current() == isolate_);
   if (wait_for_connection) {
     // Suspend V8 if it is already running or set V8 to suspend whenever
     // it starts.
@@ -3443,7 +3442,6 @@


 void Debugger::StopAgent() {
-  ASSERT(Isolate::Current() == isolate_);
   if (agent_ != NULL) {
     agent_->Shutdown();
     agent_->Join();
@@ -3454,7 +3452,6 @@


 void Debugger::WaitForAgent() {
-  ASSERT(Isolate::Current() == isolate_);
   if (agent_ != NULL)
     agent_->WaitUntilListening();
 }
@@ -3508,7 +3505,6 @@


 EnterDebugger::~EnterDebugger() {
-  ASSERT(Isolate::Current() == isolate_);
   Debug* debug = isolate_->debug();

   // Restore to the previous break state.
=======================================
--- /branches/bleeding_edge/src/debug.h Tue Sep  3 06:59:01 2013 UTC
+++ /branches/bleeding_edge/src/debug.h Thu Sep  5 11:27:22 2013 UTC
@@ -990,7 +990,6 @@
     isolate_->debug()->set_disable_break(disable_break);
   }
   ~DisableBreak() {
-    ASSERT(Isolate::Current() == isolate_);
     isolate_->debug()->set_disable_break(prev_disable_break_);
   }

=======================================
--- /branches/bleeding_edge/src/ic-inl.h        Fri Mar 22 16:33:50 2013 UTC
+++ /branches/bleeding_edge/src/ic-inl.h        Thu Sep  5 11:27:22 2013 UTC
@@ -43,7 +43,6 @@
   Address result = Assembler::target_address_from_return_address(pc());

 #ifdef ENABLE_DEBUGGER_SUPPORT
-  ASSERT(Isolate::Current() == isolate());
   Debug* debug = isolate()->debug();
// First check if any break points are active if not just return the address
   // of the call.
=======================================
--- /branches/bleeding_edge/src/isolate.cc      Tue Sep  3 11:54:08 2013 UTC
+++ /branches/bleeding_edge/src/isolate.cc      Thu Sep  5 11:27:22 2013 UTC
@@ -2145,7 +2145,6 @@

 bool Isolate::Init(Deserializer* des) {
   ASSERT(state_ != INITIALIZED);
-  ASSERT(Isolate::Current() == this);
   TRACE_ISOLATE(init);

   stress_deopt_count_ = FLAG_deopt_every_n_times;
@@ -2174,8 +2173,7 @@
   memory_allocator_ = new MemoryAllocator(this);
   code_range_ = new CodeRange(this);

-  // Safe after setting Heap::isolate_, initializing StackGuard and
-  // ensuring that Isolate::Current() == this.
+  // Safe after setting Heap::isolate_, and initializing StackGuard
   heap_.SetStackLimits();

 #define ASSIGN_ELEMENT(CamelName, hacker_name)                  \
=======================================
--- /branches/bleeding_edge/src/mark-compact.cc Wed Sep  4 13:53:24 2013 UTC
+++ /branches/bleeding_edge/src/mark-compact.cc Thu Sep  5 11:27:22 2013 UTC
@@ -1408,7 +1408,7 @@
   INLINE(static void VisitUnmarkedObject(MarkCompactCollector* collector,
                                          HeapObject* obj)) {
 #ifdef DEBUG
-    ASSERT(Isolate::Current()->heap()->Contains(obj));
+    ASSERT(collector->heap()->Contains(obj));
     ASSERT(!HEAP->mark_compact_collector()->IsMarked(obj));
 #endif
     Map* map = obj->map();
=======================================
--- /branches/bleeding_edge/src/objects-inl.h   Wed Sep  4 13:53:24 2013 UTC
+++ /branches/bleeding_edge/src/objects-inl.h   Thu Sep  5 11:27:22 2013 UTC
@@ -1185,7 +1185,6 @@
   Heap* heap =
       MemoryChunk::FromAddress(reinterpret_cast<Address>(this))->heap();
   ASSERT(heap != NULL);
-  ASSERT(heap->isolate() == Isolate::Current());
   return heap;
 }

@@ -6177,7 +6176,6 @@


 Relocatable::Relocatable(Isolate* isolate) {
-  ASSERT(isolate == Isolate::Current());
   isolate_ = isolate;
   prev_ = isolate->relocatable_top();
   isolate->set_relocatable_top(this);
@@ -6185,7 +6183,6 @@


 Relocatable::~Relocatable() {
-  ASSERT(isolate_ == Isolate::Current());
   ASSERT_EQ(isolate_->relocatable_top(), this);
   isolate_->set_relocatable_top(prev_);
 }
=======================================
--- /branches/bleeding_edge/src/objects.h       Wed Sep  4 13:53:24 2013 UTC
+++ /branches/bleeding_edge/src/objects.h       Thu Sep  5 11:27:22 2013 UTC
@@ -1713,9 +1713,7 @@
   // The Heap the object was allocated in. Used also to access Isolate.
   inline Heap* GetHeap();

-  // Convenience method to get current isolate. This method can be
-  // accessed only when its result is the same as
-  // Isolate::Current(), it ASSERTs this. See also comment for GetHeap.
+  // Convenience method to get current isolate.
   inline Isolate* GetIsolate();

   // Converts an address to a HeapObject pointer.
=======================================
--- /branches/bleeding_edge/src/regexp-macro-assembler.cc Mon Jun 10 16:31:55 2013 UTC +++ /branches/bleeding_edge/src/regexp-macro-assembler.cc Thu Sep 5 11:27:22 2013 UTC
@@ -163,7 +163,6 @@
     int* output,
     int output_size,
     Isolate* isolate) {
-  ASSERT(isolate == Isolate::Current());
   // Ensure that the minimum stack has been allocated.
   RegExpStackScope stack_scope(isolate);
   Address stack_base = stack_scope.stack()->stack_base();
@@ -238,7 +237,6 @@
     Address byte_offset2,
     size_t byte_length,
     Isolate* isolate) {
-  ASSERT(isolate == Isolate::Current());
   unibrow::Mapping<unibrow::Ecma262Canonicalize>* canonicalize =
       isolate->regexp_macro_assembler_canonicalize();
   // This function is not allowed to cause a garbage collection.
@@ -271,7 +269,6 @@
 Address NativeRegExpMacroAssembler::GrowStack(Address stack_pointer,
                                               Address* stack_base,
                                               Isolate* isolate) {
-  ASSERT(isolate == Isolate::Current());
   RegExpStack* regexp_stack = isolate->regexp_stack();
   size_t size = regexp_stack->stack_capacity();
   Address old_stack_base = regexp_stack->stack_base();
=======================================
--- /branches/bleeding_edge/src/regexp-stack.cc Tue Apr 16 12:30:51 2013 UTC
+++ /branches/bleeding_edge/src/regexp-stack.cc Thu Sep  5 11:27:22 2013 UTC
@@ -39,7 +39,6 @@


 RegExpStackScope::~RegExpStackScope() {
-  ASSERT(Isolate::Current() == regexp_stack_->isolate_);
   // Reset the buffer if it has grown.
   regexp_stack_->Reset();
 }
=======================================
--- /branches/bleeding_edge/src/runtime.cc      Thu Sep  5 08:48:34 2013 UTC
+++ /branches/bleeding_edge/src/runtime.cc      Thu Sep  5 11:27:22 2013 UTC
@@ -14602,7 +14602,6 @@

 MaybeObject* Runtime::InitializeIntrinsicFunctionNames(Heap* heap,
Object* dictionary) {
-  ASSERT(Isolate::Current()->heap() == heap);
   ASSERT(dictionary != NULL);
   ASSERT(NameDictionary::cast(dictionary)->NumberOfElements() == 0);
   for (int i = 0; i < kNumFunctions; ++i) {
=======================================
--- /branches/bleeding_edge/src/stub-cache.cc   Thu Sep  5 11:18:52 2013 UTC
+++ /branches/bleeding_edge/src/stub-cache.cc   Thu Sep  5 11:27:22 2013 UTC
@@ -45,9 +45,7 @@


 StubCache::StubCache(Isolate* isolate)
-    : isolate_(isolate) {
-  ASSERT(isolate == Isolate::Current());
-}
+    : isolate_(isolate) { }


 void StubCache::Initialize() {
=======================================
--- /branches/bleeding_edge/src/v8.cc   Thu Sep  5 08:17:57 2013 UTC
+++ /branches/bleeding_edge/src/v8.cc   Thu Sep  5 11:27:22 2013 UTC
@@ -168,7 +168,6 @@
 // purposes. So, we keep a different state to prevent informations
 // leaks that could be used in an exploit.
 uint32_t V8::RandomPrivate(Isolate* isolate) {
-  ASSERT(isolate == Isolate::Current());
   return random_base(isolate->private_random_seed());
 }

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to