Revision: 16493
Author:   [email protected]
Date:     Tue Sep  3 07:34:34 2013 UTC
Log:      Deprecate Persistent functions which were marked to be deprecated.

BUG=
[email protected]

Review URL: https://codereview.chromium.org/23707009

Patch from Marja Hölttä <[email protected]>.
http://code.google.com/p/v8/source/detail?r=16493

Modified:
 /branches/bleeding_edge/include/v8.h
 /branches/bleeding_edge/samples/process.cc
 /branches/bleeding_edge/src/d8.cc
 /branches/bleeding_edge/src/debug.cc
 /branches/bleeding_edge/src/i18n.cc
 /branches/bleeding_edge/src/mksnapshot.cc
 /branches/bleeding_edge/test/cctest/test-api.cc
 /branches/bleeding_edge/test/cctest/test-debug.cc
 /branches/bleeding_edge/test/cctest/test-declarative-accessors.cc
 /branches/bleeding_edge/test/cctest/test-decls.cc
 /branches/bleeding_edge/test/cctest/test-heap-profiler.cc
 /branches/bleeding_edge/test/cctest/test-heap.cc
 /branches/bleeding_edge/test/cctest/test-mark-compact.cc
 /branches/bleeding_edge/test/cctest/test-serialize.cc
 /branches/bleeding_edge/test/cctest/test-weakmaps.cc
 /branches/bleeding_edge/test/cctest/test-weaksets.cc

=======================================
--- /branches/bleeding_edge/include/v8.h        Mon Sep  2 10:35:34 2013 UTC
+++ /branches/bleeding_edge/include/v8.h        Tue Sep  3 07:34:34 2013 UTC
@@ -634,8 +634,7 @@
    * This handle's reference, and any other references to the storage
    * cell remain and IsEmpty will still return false.
    */
-  // TODO(dcarney): deprecate
-  V8_INLINE(void Dispose(Isolate* isolate)) { Dispose(); }
+  V8_DEPRECATED(V8_INLINE(void Dispose(Isolate* isolate))) { Dispose(); }

   /**
    * Make the reference to this object weak.  When only weak handles
@@ -667,8 +666,7 @@

   V8_INLINE(void ClearWeak());

-  // TODO(dcarney): deprecate
-  V8_INLINE(void ClearWeak(Isolate* isolate)) { ClearWeak(); }
+ V8_DEPRECATED(V8_INLINE(void ClearWeak(Isolate* isolate))) { ClearWeak(); }

   /**
* Marks the reference to this object independent. Garbage collector is free
@@ -678,8 +676,9 @@
    */
   V8_INLINE(void MarkIndependent());

-  // TODO(dcarney): deprecate
-  V8_INLINE(void MarkIndependent(Isolate* isolate)) { MarkIndependent(); }
+  V8_DEPRECATED(V8_INLINE(void MarkIndependent(Isolate* isolate))) {
+    MarkIndependent();
+  }

   /**
* Marks the reference to this object partially dependent. Partially dependent
@@ -691,29 +690,29 @@
    */
   V8_INLINE(void MarkPartiallyDependent());

-  // TODO(dcarney): deprecate
-  V8_INLINE(void MarkPartiallyDependent(Isolate* isolate)) {
+  V8_DEPRECATED(V8_INLINE(void MarkPartiallyDependent(Isolate* isolate))) {
     MarkPartiallyDependent();
   }

   V8_INLINE(bool IsIndependent() const);

-  // TODO(dcarney): deprecate
-  V8_INLINE(bool IsIndependent(Isolate* isolate) const) {
+  V8_DEPRECATED(V8_INLINE(bool IsIndependent(Isolate* isolate)) const) {
     return IsIndependent();
   }

   /** Checks if the handle holds the only reference to an object. */
   V8_INLINE(bool IsNearDeath() const);

-  // TODO(dcarney): deprecate
- V8_INLINE(bool IsNearDeath(Isolate* isolate) const) { return IsNearDeath(); }
+  V8_DEPRECATED(V8_INLINE(bool IsNearDeath(Isolate* isolate)) const) {
+    return IsNearDeath();
+  }

   /** Returns true if the handle's reference is weak.  */
   V8_INLINE(bool IsWeak() const);

-  // TODO(dcarney): deprecate
-  V8_INLINE(bool IsWeak(Isolate* isolate) const) { return IsWeak(); }
+  V8_DEPRECATED(V8_INLINE(bool IsWeak(Isolate* isolate)) const) {
+    return IsWeak();
+  }

   /**
* Assigns a wrapper class ID to the handle. See RetainedObjectInfo interface
@@ -721,8 +720,8 @@
    */
   V8_INLINE(void SetWrapperClassId(uint16_t class_id));

-  // TODO(dcarney): deprecate
-  V8_INLINE(void SetWrapperClassId(Isolate* isolate, uint16_t class_id)) {
+  V8_DEPRECATED(
+ V8_INLINE(void SetWrapperClassId(Isolate * isolate, uint16_t class_id))) {
     SetWrapperClassId(class_id);
   }

@@ -732,8 +731,7 @@
    */
   V8_INLINE(uint16_t WrapperClassId() const);

-  // TODO(dcarney): deprecate
-  V8_INLINE(uint16_t WrapperClassId(Isolate* isolate) const) {
+ V8_DEPRECATED(V8_INLINE(uint16_t WrapperClassId(Isolate* isolate)) const) {
     return WrapperClassId();
   }

@@ -5736,7 +5734,7 @@

 template <class T>
 void Persistent<T>::Reset(Isolate* isolate, const Handle<T>& other) {
-  Dispose(isolate);
+  Dispose();
 #ifdef V8_USE_UNSAFE_HANDLES
   *this = *New(isolate, other);
 #else
@@ -5754,7 +5752,7 @@
 #ifndef V8_USE_UNSAFE_HANDLES
 template <class T>
 void Persistent<T>::Reset(Isolate* isolate, const Persistent<T>& other) {
-  Dispose(isolate);
+  Dispose();
   if (other.IsEmpty()) {
     this->val_ = NULL;
     return;
=======================================
--- /branches/bleeding_edge/samples/process.cc  Thu Jul 11 09:58:54 2013 UTC
+++ /branches/bleeding_edge/samples/process.cc  Tue Sep  3 07:34:34 2013 UTC
@@ -291,9 +291,8 @@
   // Dispose the persistent handles.  When noone else has any
   // references to the objects stored in the handles they will be
   // automatically reclaimed.
-  Isolate* isolate = GetIsolate();
-  context_.Dispose(isolate);
-  process_.Dispose(isolate);
+  context_.Dispose();
+  process_.Dispose();
 }


=======================================
--- /branches/bleeding_edge/src/d8.cc   Tue Sep  3 06:59:01 2013 UTC
+++ /branches/bleeding_edge/src/d8.cc   Tue Sep  3 07:34:34 2013 UTC
@@ -271,10 +271,10 @@
 PerIsolateData::RealmScope::~RealmScope() {
   // Drop realms to avoid keeping them alive.
   for (int i = 0; i < data_->realm_count_; ++i)
-    data_->realms_[i].Dispose(data_->isolate_);
+    data_->realms_[i].Dispose();
   delete[] data_->realms_;
   if (!data_->realm_shared_.IsEmpty())
-    data_->realm_shared_.Dispose(data_->isolate_);
+    data_->realm_shared_.Dispose();
 }


@@ -361,7 +361,7 @@
     Throw("Invalid realm index");
     return;
   }
-  data->realms_[index].Dispose(isolate);
+  data->realms_[index].Dispose();
   data->realms_[index].Clear();
 }

@@ -420,7 +420,7 @@
                            const PropertyCallbackInfo<void>& info) {
   Isolate* isolate = info.GetIsolate();
   PerIsolateData* data = PerIsolateData::Get(isolate);
-  if (!data->realm_shared_.IsEmpty()) data->realm_shared_.Dispose(isolate);
+  if (!data->realm_shared_.IsEmpty()) data->realm_shared_.Dispose();
   data->realm_shared_.Reset(isolate, value);
 }

=======================================
--- /branches/bleeding_edge/src/debug.cc        Tue Sep  3 06:59:01 2013 UTC
+++ /branches/bleeding_edge/src/debug.cc        Tue Sep  3 07:34:34 2013 UTC
@@ -709,7 +709,7 @@
   script_cache->collected_scripts_.Add(id);

   // Clear the weak handle.
-  obj->Dispose(isolate);
+  obj->Dispose();
 }


=======================================
--- /branches/bleeding_edge/src/i18n.cc Tue Aug 20 08:46:36 2013 UTC
+++ /branches/bleeding_edge/src/i18n.cc Tue Sep  3 07:34:34 2013 UTC
@@ -872,7 +872,7 @@
       v8::Utils::OpenPersistent(object))->GetInternalField(0));

   // Then dispose of the persistent handle to JS object.
-  object->Dispose(isolate);
+  object->Dispose();
 }


@@ -936,7 +936,7 @@
       v8::Utils::OpenPersistent(object))->GetInternalField(0));

   // Then dispose of the persistent handle to JS object.
-  object->Dispose(isolate);
+  object->Dispose();
 }


@@ -997,7 +997,7 @@
       v8::Utils::OpenPersistent(object))->GetInternalField(0));

   // Then dispose of the persistent handle to JS object.
-  object->Dispose(isolate);
+  object->Dispose();
 }


@@ -1064,7 +1064,7 @@
       v8::Utils::OpenPersistent(object))->GetInternalField(1));

   // Then dispose of the persistent handle to JS object.
-  object->Dispose(isolate);
+  object->Dispose();
 }

 } }  // namespace v8::internal
=======================================
--- /branches/bleeding_edge/src/mksnapshot.cc   Mon Aug 26 17:00:58 2013 UTC
+++ /branches/bleeding_edge/src/mksnapshot.cc   Tue Sep  3 07:34:34 2013 UTC
@@ -398,7 +398,7 @@
   // context even after we have disposed of the context.
   HEAP->CollectAllGarbage(i::Heap::kNoGCFlags, "mksnapshot");
   i::Object* raw_context = *v8::Utils::OpenPersistent(context);
-  context.Dispose(isolate);
+  context.Dispose();
   CppByteSink sink(argv[1]);
// This results in a somewhat smaller snapshot, probably because it gets rid
   // of some things that are cached between garbage collections.
=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc Mon Sep 2 12:26:06 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-api.cc Tue Sep 3 07:34:34 2013 UTC
@@ -3108,7 +3108,7 @@
     v8::HandleScope scope(isolate);
     CHECK_EQ(v8::Local<String>::New(isolate, global)->Length(), 6);
   }
-  global.Dispose(isolate);
+  global.Dispose();
CHECK_EQ(global_handles->global_handles_count(), initial_handle_count - 1);
 }

@@ -3242,7 +3242,7 @@
                                 WeakCallCounter* counter) {
   CHECK_EQ(1234, counter->id());
   counter->increment();
-  handle->Dispose(isolate);
+  handle->Dispose();
 }


@@ -3315,8 +3315,8 @@
   root.MakeWeak(&counter, &WeakPointerCallback);
   // But make children strong roots---all the objects (except for children)
   // should be collectable now.
-  g1c1.ClearWeak(iso);
-  g2c1.ClearWeak(iso);
+  g1c1.ClearWeak();
+  g2c1.ClearWeak();

   // Groups are deleted, rebuild groups.
   {
@@ -3366,29 +3366,29 @@
     g1s2.Reset(iso, Object::New());
     g1s1.MakeWeak(&counter, &WeakPointerCallback);
     g1s2.MakeWeak(&counter, &WeakPointerCallback);
-    CHECK(g1s1.IsWeak(iso));
-    CHECK(g1s2.IsWeak(iso));
+    CHECK(g1s1.IsWeak());
+    CHECK(g1s2.IsWeak());

     g2s1.Reset(iso, Object::New());
     g2s2.Reset(iso, Object::New());
     g2s1.MakeWeak(&counter, &WeakPointerCallback);
     g2s2.MakeWeak(&counter, &WeakPointerCallback);
-    CHECK(g2s1.IsWeak(iso));
-    CHECK(g2s2.IsWeak(iso));
+    CHECK(g2s1.IsWeak());
+    CHECK(g2s2.IsWeak());

     g3s1.Reset(iso, Object::New());
     g3s2.Reset(iso, Object::New());
     g3s1.MakeWeak(&counter, &WeakPointerCallback);
     g3s2.MakeWeak(&counter, &WeakPointerCallback);
-    CHECK(g3s1.IsWeak(iso));
-    CHECK(g3s2.IsWeak(iso));
+    CHECK(g3s1.IsWeak());
+    CHECK(g3s2.IsWeak());

     g4s1.Reset(iso, Object::New());
     g4s2.Reset(iso, Object::New());
     g4s1.MakeWeak(&counter, &WeakPointerCallback);
     g4s2.MakeWeak(&counter, &WeakPointerCallback);
-    CHECK(g4s1.IsWeak(iso));
-    CHECK(g4s2.IsWeak(iso));
+    CHECK(g4s1.IsWeak());
+    CHECK(g4s2.IsWeak());
   }

   Persistent<Value> root(iso, g1s1);  // make a root.
@@ -3490,19 +3490,19 @@

   // Make a root.
   Persistent<Value> root(iso, g1s1);
-  root.MarkPartiallyDependent(iso);
+  root.MarkPartiallyDependent();

   // Connect groups.  We're building the following cycle:
   // G1: { g1s1, g2s1 }, g1s1 implicitly references g2s1, ditto for other
   // groups.
   {
     HandleScope handle_scope(iso);
-    g1s1.MarkPartiallyDependent(iso);
-    g1s2.MarkPartiallyDependent(iso);
-    g2s1.MarkPartiallyDependent(iso);
-    g2s2.MarkPartiallyDependent(iso);
-    g3s1.MarkPartiallyDependent(iso);
-    g3s2.MarkPartiallyDependent(iso);
+    g1s1.MarkPartiallyDependent();
+    g1s2.MarkPartiallyDependent();
+    g2s1.MarkPartiallyDependent();
+    g2s2.MarkPartiallyDependent();
+    g3s1.MarkPartiallyDependent();
+    g3s2.MarkPartiallyDependent();
     iso->SetObjectGroupId(g1s1, UniqueId(1));
     iso->SetObjectGroupId(g1s2, UniqueId(1));
     Local<Object>::New(iso, g1s1.As<Object>())->Set(
@@ -3526,18 +3526,17 @@

   // Weaken the root.
   root.MakeWeak(&counter, &WeakPointerCallback);
-  root.MarkPartiallyDependent(iso);
+  root.MarkPartiallyDependent();

-  v8::Isolate* isolate = v8::Isolate::GetCurrent();
   // Groups are deleted, rebuild groups.
   {
     HandleScope handle_scope(iso);
-    g1s1.MarkPartiallyDependent(isolate);
-    g1s2.MarkPartiallyDependent(isolate);
-    g2s1.MarkPartiallyDependent(isolate);
-    g2s2.MarkPartiallyDependent(isolate);
-    g3s1.MarkPartiallyDependent(isolate);
-    g3s2.MarkPartiallyDependent(isolate);
+    g1s1.MarkPartiallyDependent();
+    g1s2.MarkPartiallyDependent();
+    g2s1.MarkPartiallyDependent();
+    g2s2.MarkPartiallyDependent();
+    g3s1.MarkPartiallyDependent();
+    g3s2.MarkPartiallyDependent();
     iso->SetObjectGroupId(g1s1, UniqueId(1));
     iso->SetObjectGroupId(g1s2, UniqueId(1));
     Local<Object>::New(iso, g1s1.As<Object>())->Set(
@@ -4895,7 +4894,7 @@
   v8::Handle<v8::Object> obj = v8::Object::New();
   v8::Persistent<v8::Object> alias(isolate, obj);
   CHECK(v8::Local<v8::Object>::New(isolate, alias)->StrictEquals(obj));
-  alias.Dispose(isolate);
+  alias.Dispose();
 }


@@ -5210,7 +5209,7 @@
     CHECK(xValue.IsEmpty());
     script->Run();
CHECK_EQ(v8_num(4), Local<Value>::New(v8::Isolate::GetCurrent(), xValue));
-    xValue.Dispose(context->GetIsolate());
+    xValue.Dispose();
     xValue.Clear();
   }
 }
@@ -5227,7 +5226,7 @@
     CHECK(xValue.IsEmpty());
     script->Run();
CHECK_EQ(v8_num(4), Local<Value>::New(v8::Isolate::GetCurrent(), xValue));
-    xValue.Dispose(context->GetIsolate());
+    xValue.Dispose();
     xValue.Clear();
   }
 }
@@ -6602,7 +6601,7 @@
 class Whammy {
  public:
   explicit Whammy(v8::Isolate* isolate) : cursor_(0), isolate_(isolate) { }
-  ~Whammy() { script_.Dispose(isolate_); }
+  ~Whammy() { script_.Dispose(); }
   v8::Handle<Script> getScript() {
if (script_.IsEmpty()) script_.Reset(isolate_, v8_compile("({}).blammo"));
     return Local<Script>::New(isolate_, script_);
@@ -6620,7 +6619,7 @@
                                 v8::Persistent<v8::Value>* obj,
                                 Snorkel* snorkel) {
   delete snorkel;
-  obj->ClearWeak(isolate);
+  obj->ClearWeak();
 }

 void WhammyPropertyGetter(Local<String> name,
@@ -6676,7 +6675,7 @@
 static void DisposeAndSetFlag(v8::Isolate* isolate,
                               v8::Persistent<v8::Object>* obj,
                               bool* data) {
-  obj->Dispose(isolate);
+  obj->Dispose();
   *(data) = true;
 }

@@ -6699,10 +6698,10 @@
   bool object_b_disposed = false;
   object_a.MakeWeak(&object_a_disposed, &DisposeAndSetFlag);
   object_b.MakeWeak(&object_b_disposed, &DisposeAndSetFlag);
-  CHECK(!object_b.IsIndependent(iso));
-  object_a.MarkIndependent(iso);
-  object_b.MarkIndependent(iso);
-  CHECK(object_b.IsIndependent(iso));
+  CHECK(!object_b.IsIndependent());
+  object_a.MarkIndependent();
+  object_b.MarkIndependent();
+  CHECK(object_b.IsIndependent());
   HEAP->PerformScavenge();
   CHECK(object_a_disposed);
   CHECK(object_b_disposed);
@@ -6722,7 +6721,7 @@
 static void ForceScavenge(v8::Isolate* isolate,
                           v8::Persistent<v8::Object>* obj,
                           bool* data) {
-  obj->Dispose(isolate);
+  obj->Dispose();
   *(data) = true;
   InvokeScavenge();
 }
@@ -6731,7 +6730,7 @@
 static void ForceMarkSweep(v8::Isolate* isolate,
                            v8::Persistent<v8::Object>* obj,
                            bool* data) {
-  obj->Dispose(isolate);
+  obj->Dispose();
   *(data) = true;
   InvokeMarkSweep();
 }
@@ -6760,7 +6759,7 @@
       }
       bool disposed = false;
       object.MakeWeak(&disposed, gc_forcing_callback[inner_gc]);
-      object.MarkIndependent(isolate);
+      object.MarkIndependent();
       invoke_gc[outer_gc]();
       CHECK(disposed);
     }
@@ -6771,7 +6770,7 @@
 static void RevivingCallback(v8::Isolate* isolate,
                              v8::Persistent<v8::Object>* obj,
                              bool* data) {
-  obj->ClearWeak(isolate);
+  obj->ClearWeak();
   *(data) = true;
 }

@@ -6793,7 +6792,7 @@
   }
   bool revived = false;
   object.MakeWeak(&revived, &RevivingCallback);
-  object.MarkIndependent(isolate);
+  object.MarkIndependent();
   HEAP->PerformScavenge();
   CHECK(revived);
   HEAP->CollectAllGarbage(i::Heap::kAbortIncrementalMarkingMask);
@@ -12598,7 +12597,7 @@
                                  void*) {
   v8::HandleScope scope(isolate);
   bad_handle.Reset(isolate, some_object);
-  handle->Dispose(isolate);
+  handle->Dispose();
 }


@@ -12618,7 +12617,7 @@
   // in reverse allocation order, so if second allocated handle is deleted,
   // weak callback of the first handle would be able to 'reallocate' it.
   handle1.MakeWeak<v8::Value, void>(NULL, NewPersistentHandleCallback);
-  handle2.Dispose(isolate);
+  handle2.Dispose();
   HEAP->CollectAllGarbage(i::Heap::kNoGCFlags);
 }

@@ -12628,9 +12627,9 @@
 void DisposeAndForceGcCallback(v8::Isolate* isolate,
                                v8::Persistent<v8::Value>* handle,
                                void*) {
-  to_be_disposed.Dispose(isolate);
+  to_be_disposed.Dispose();
   HEAP->CollectAllGarbage(i::Heap::kNoGCFlags);
-  handle->Dispose(isolate);
+  handle->Dispose();
 }


@@ -12652,7 +12651,7 @@
 void DisposingCallback(v8::Isolate* isolate,
                        v8::Persistent<v8::Value>* handle,
                        void*) {
-  handle->Dispose(isolate);
+  handle->Dispose();
 }

 void HandleCreatingCallback(v8::Isolate* isolate,
@@ -12660,7 +12659,7 @@
                             void*) {
   v8::HandleScope scope(isolate);
   v8::Persistent<v8::Object>(isolate, v8::Object::New());
-  handle->Dispose(isolate);
+  handle->Dispose();
 }


@@ -18590,15 +18589,15 @@
   v8::Isolate* isolate = context->GetIsolate();
   v8::HandleScope scope(isolate);
   v8::Persistent<v8::Object> object(isolate, v8::Object::New());
-  CHECK_EQ(0, object.WrapperClassId(isolate));
-  object.SetWrapperClassId(isolate, 42);
-  CHECK_EQ(42, object.WrapperClassId(isolate));
+  CHECK_EQ(0, object.WrapperClassId());
+  object.SetWrapperClassId(42);
+  CHECK_EQ(42, object.WrapperClassId());

   Visitor42 visitor(&object);
   v8::V8::VisitHandlesWithClassIds(&visitor);
   CHECK_EQ(1, visitor.counter_);

-  object.Dispose(isolate);
+  object.Dispose();
 }


@@ -18607,10 +18606,10 @@
   v8::Isolate* isolate = context->GetIsolate();
   v8::HandleScope scope(isolate);
   v8::Persistent<v8::Object> object(isolate, v8::Object::New());
-  CHECK_EQ(0, object.WrapperClassId(isolate));
-  object.SetWrapperClassId(isolate, 65535);
-  CHECK_EQ(65535, object.WrapperClassId(isolate));
-  object.Dispose(isolate);
+  CHECK_EQ(0, object.WrapperClassId());
+  object.SetWrapperClassId(65535);
+  CHECK_EQ(65535, object.WrapperClassId());
+  object.Dispose();
 }


@@ -18619,23 +18618,23 @@
   v8::Isolate* isolate = context->GetIsolate();
   v8::HandleScope scope(isolate);
   v8::Persistent<v8::Object> object1(isolate, v8::Object::New());
-  CHECK_EQ(0, object1.WrapperClassId(isolate));
-  object1.SetWrapperClassId(isolate, 42);
-  CHECK_EQ(42, object1.WrapperClassId(isolate));
+  CHECK_EQ(0, object1.WrapperClassId());
+  object1.SetWrapperClassId(42);
+  CHECK_EQ(42, object1.WrapperClassId());

   HEAP->CollectAllGarbage(i::Heap::kNoGCFlags);

   v8::Persistent<v8::Object> object2(isolate, v8::Object::New());
-  CHECK_EQ(0, object2.WrapperClassId(isolate));
-  object2.SetWrapperClassId(isolate, 42);
-  CHECK_EQ(42, object2.WrapperClassId(isolate));
+  CHECK_EQ(0, object2.WrapperClassId());
+  object2.SetWrapperClassId(42);
+  CHECK_EQ(42, object2.WrapperClassId());

   Visitor42 visitor(&object2);
   v8::V8::VisitHandlesForPartialDependence(isolate, &visitor);
   CHECK_EQ(1, visitor.counter_);

-  object1.Dispose(isolate);
-  object2.Dispose(isolate);
+  object1.Dispose();
+  object2.Dispose();
 }


=======================================
--- /branches/bleeding_edge/test/cctest/test-debug.cc Tue Sep 3 06:59:01 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-debug.cc Tue Sep 3 07:34:34 2013 UTC
@@ -6635,7 +6635,7 @@
         v8::Local<v8::Context>::New(isolate, context);
     local_context->Exit();
   }
-  context.Dispose(isolate);
+  context.Dispose();

   // Do garbage collection to collect the script above which is no longer
   // referenced.
=======================================
--- /branches/bleeding_edge/test/cctest/test-declarative-accessors.cc Thu Jun 13 09:27:09 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-declarative-accessors.cc Tue Sep 3 07:34:34 2013 UTC
@@ -38,11 +38,11 @@
  public:
   static const unsigned kArraySize = 200;
   explicit HandleArray() {}
-  ~HandleArray() { Reset(v8::Isolate::GetCurrent()); }
-  void Reset(v8::Isolate* isolate) {
+  ~HandleArray() { Reset(); }
+  void Reset() {
     for (unsigned i = 0; i < kArraySize; i++) {
       if (handles_[i].IsEmpty()) continue;
-      handles_[i].Dispose(isolate);
+      handles_[i].Dispose();
       handles_[i].Clear();
     }
   }
=======================================
--- /branches/bleeding_edge/test/cctest/test-decls.cc Thu Jun 20 12:28:27 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-decls.cc Tue Sep 3 07:34:34 2013 UTC
@@ -56,7 +56,7 @@
       HandleScope scope(isolate);
       Local<Context> context = Local<Context>::New(isolate, context_);
       context->Exit();
-      context_.Dispose(isolate);
+      context_.Dispose();
     }
   }

=======================================
--- /branches/bleeding_edge/test/cctest/test-heap-profiler.cc Wed Jul 17 18:23:16 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-heap-profiler.cc Tue Sep 3 07:34:34 2013 UTC
@@ -1201,11 +1201,11 @@
   heap_profiler->SetWrapperClassInfoProvider(
       2, TestRetainedObjectInfo::WrapperInfoCallback);
   v8::Persistent<v8::String> p_AAA(isolate, v8_str("AAA"));
-  p_AAA.SetWrapperClassId(isolate, 1);
+  p_AAA.SetWrapperClassId(1);
   v8::Persistent<v8::String> p_BBB(isolate, v8_str("BBB"));
-  p_BBB.SetWrapperClassId(isolate, 1);
+  p_BBB.SetWrapperClassId(1);
   v8::Persistent<v8::String> p_CCC(isolate, v8_str("CCC"));
-  p_CCC.SetWrapperClassId(isolate, 2);
+  p_CCC.SetWrapperClassId(2);
   CHECK_EQ(0, TestRetainedObjectInfo::instances.length());
   const v8::HeapSnapshot* snapshot =
       heap_profiler->TakeHeapSnapshot(v8_str("retained"));
@@ -1711,7 +1711,7 @@
 static void PersistentHandleCallback(v8::Isolate* isolate,
                                      v8::Persistent<v8::Value>* handle,
                                      void*) {
-  handle->Dispose(isolate);
+  handle->Dispose();
 }


=======================================
--- /branches/bleeding_edge/test/cctest/test-heap.cc Tue Sep 3 06:59:01 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-heap.cc Tue Sep 3 07:34:34 2013 UTC
@@ -401,7 +401,7 @@
                                          v8::Persistent<v8::Value>* handle,
                                          void* id) {
   if (1234 == reinterpret_cast<intptr_t>(id)) WeakPointerCleared = true;
-  handle->Dispose(isolate);
+  handle->Dispose();
 }


@@ -1723,12 +1723,12 @@
     ctx2->Global()->Set(v8_str("o"), v8::Int32::New(0));
     ctx2->Exit();
     v8::Local<v8::Context>::New(isolate, ctx1)->Exit();
-    ctx1p.Dispose(isolate);
+    ctx1p.Dispose();
     v8::V8::ContextDisposedNotification();
   }
   HEAP->CollectAllAvailableGarbage();
   CHECK_EQ(2, NumberOfGlobalObjects());
-  ctx2p.Dispose(isolate);
+  ctx2p.Dispose();
   HEAP->CollectAllAvailableGarbage();
   CHECK_EQ(0, NumberOfGlobalObjects());
 }
@@ -1769,12 +1769,12 @@
     ctx2->Global()->Set(v8_str("o"), v8::Int32::New(0));
     ctx2->Exit();
     ctx1->Exit();
-    ctx1p.Dispose(ctx1->GetIsolate());
+    ctx1p.Dispose();
     v8::V8::ContextDisposedNotification();
   }
   HEAP->CollectAllAvailableGarbage();
   CHECK_EQ(2, NumberOfGlobalObjects());
-  ctx2p.Dispose(isolate);
+  ctx2p.Dispose();
   HEAP->CollectAllAvailableGarbage();
   CHECK_EQ(0, NumberOfGlobalObjects());
 }
@@ -1813,12 +1813,12 @@
     ctx2->Global()->Set(v8_str("o"), v8::Int32::New(0));
     ctx2->Exit();
     ctx1->Exit();
-    ctx1p.Dispose(ctx1->GetIsolate());
+    ctx1p.Dispose();
     v8::V8::ContextDisposedNotification();
   }
   HEAP->CollectAllAvailableGarbage();
   CHECK_EQ(2, NumberOfGlobalObjects());
-  ctx2p.Dispose(isolate);
+  ctx2p.Dispose();
   HEAP->CollectAllAvailableGarbage();
   CHECK_EQ(0, NumberOfGlobalObjects());
 }
@@ -1861,12 +1861,12 @@
     ctx2->Global()->Set(v8_str("o"), v8::Int32::New(0));
     ctx2->Exit();
     ctx1->Exit();
-    ctx1p.Dispose(isolate);
+    ctx1p.Dispose();
     v8::V8::ContextDisposedNotification();
   }
   HEAP->CollectAllAvailableGarbage();
   CHECK_EQ(2, NumberOfGlobalObjects());
-  ctx2p.Dispose(isolate);
+  ctx2p.Dispose();
   HEAP->CollectAllAvailableGarbage();
   CHECK_EQ(0, NumberOfGlobalObjects());
 }
=======================================
--- /branches/bleeding_edge/test/cctest/test-mark-compact.cc Fri Aug 23 11:04:25 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-mark-compact.cc Tue Sep 3 07:34:34 2013 UTC
@@ -307,7 +307,7 @@
                                 void* id) {
   ASSERT(id == reinterpret_cast<void*>(1234));
   NumberOfWeakCalls++;
-  handle->Dispose(isolate);
+  handle->Dispose();
 }


=======================================
--- /branches/bleeding_edge/test/cctest/test-serialize.cc Wed Jun 19 16:50:38 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-serialize.cc Tue Sep 3 07:34:34 2013 UTC
@@ -412,7 +412,7 @@
       v8::HandleScope handle_scope(v8_isolate);
       v8::Local<v8::Context>::New(v8_isolate, env)->Exit();
     }
-    env.Dispose(v8_isolate);
+    env.Dispose();

     FileByteSink startup_sink(startup_name.start());
     StartupSerializer startup_serializer(&startup_sink);
@@ -558,7 +558,7 @@

     i::Object* raw_context = *v8::Utils::OpenPersistent(env);

-    env.Dispose(v8_isolate);
+    env.Dispose();

     FileByteSink startup_sink(startup_name.start());
     StartupSerializer startup_serializer(&startup_sink);
=======================================
--- /branches/bleeding_edge/test/cctest/test-weakmaps.cc Mon Jun 3 08:17:04 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-weakmaps.cc Tue Sep 3 07:34:34 2013 UTC
@@ -69,7 +69,7 @@
                                 void* id) {
   ASSERT(id == reinterpret_cast<void*>(1234));
   NumberOfWeakCalls++;
-  handle->Dispose(isolate);
+  handle->Dispose();
 }


=======================================
--- /branches/bleeding_edge/test/cctest/test-weaksets.cc Mon Jul 22 08:32:24 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-weaksets.cc Tue Sep 3 07:34:34 2013 UTC
@@ -69,7 +69,7 @@
                                 void* id) {
   ASSERT(id == reinterpret_cast<void*>(1234));
   NumberOfWeakCalls++;
-  handle->Dispose(isolate);
+  handle->Dispose();
 }


--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to