Reviewers: Sven Panne,

Message:
svenpanne, ptal

Chrome should be migrated by now.

Description:
Remove HandleScope default ctor.

BUG=

Please review this at https://codereview.chromium.org/23530045/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+5, -14 lines):
  M include/v8.h
  M src/api.cc
  M test/cctest/test-heap.cc
  M test/cctest/test-mark-compact.cc
  M test/cctest/test-thread-termination.cc


Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index ba4d19b01d45bba7981f4849eafcd81acc49ad37..2b7b456e9d9cb650c9e356854819e71424d6c6b0 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -813,9 +813,6 @@ template <class T> class Persistent // NOLINT
  */
 class V8_EXPORT HandleScope {
  public:
-  // TODO(svenpanne) Deprecate me when Chrome is fixed!
-  HandleScope();
-
   HandleScope(Isolate* isolate);

   ~HandleScope();
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 44a8d47b653b35ab2c59cc7a88129e86a0d111c9..36d0ae0f7b7b02166075697aae6659494193ad66 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -695,11 +695,6 @@ Local<Value> V8::GetEternal(Isolate* v8_isolate, int index) {
 // --- H a n d l e s ---


-HandleScope::HandleScope() {
-  Initialize(reinterpret_cast<Isolate*>(i::Isolate::Current()));
-}
-
-
 HandleScope::HandleScope(Isolate* isolate) {
   Initialize(isolate);
 }
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index 95e22d4d042963e386d77d8831e2a07ff48a5a9b..64075d26b4367bf17939c26c972b98bc2c868549 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -3422,7 +3422,7 @@ TEST(DeferredHandles) {
   CcTest::InitializeVM();
   Isolate* isolate = Isolate::Current();
   Heap* heap = isolate->heap();
-  v8::HandleScope scope;
+  v8::HandleScope scope(reinterpret_cast<v8::Isolate*>(isolate));
   v8::ImplementationUtilities::HandleScopeData* data =
       isolate->handle_scope_data();
   Handle<Object> init(heap->empty_string(), isolate);
Index: test/cctest/test-mark-compact.cc
diff --git a/test/cctest/test-mark-compact.cc b/test/cctest/test-mark-compact.cc index 21700f7df5a7c3a851eb7475657d99af727226a9..33d9230e01763b35f8841f395b3f8db2dd72913e 100644
--- a/test/cctest/test-mark-compact.cc
+++ b/test/cctest/test-mark-compact.cc
@@ -572,7 +572,7 @@ intptr_t ShortLivingIsolate() {
   v8::Isolate* isolate = v8::Isolate::New();
   { v8::Isolate::Scope isolate_scope(isolate);
     v8::Locker lock(isolate);
-    v8::HandleScope handle_scope;
+    v8::HandleScope handle_scope(isolate);
     v8::Local<v8::Context> context = v8::Context::New(isolate);
     CHECK(!context.IsEmpty());
   }
Index: test/cctest/test-thread-termination.cc
diff --git a/test/cctest/test-thread-termination.cc b/test/cctest/test-thread-termination.cc index 4c0853955cfff25b8025fb90f5b55672e4cde5b5..e9c991897e797132353ea0e0183f1007f4b4fd5c 100644
--- a/test/cctest/test-thread-termination.cc
+++ b/test/cctest/test-thread-termination.cc
@@ -391,11 +391,11 @@ void DoLoopCancelTerminate(const v8::FunctionCallbackInfo<v8::Value>& args) {
 // Test that a single thread of JavaScript execution can terminate
 // itself and then resume execution.
 TEST(TerminateCancelTerminateFromThreadItself) {
-  v8::HandleScope scope;
+  v8::Isolate* isolate = v8::Isolate::GetCurrent();
+  v8::HandleScope scope(isolate);
   v8::Handle<v8::ObjectTemplate> global =
       CreateGlobalTemplate(TerminateCurrentThread, DoLoopCancelTerminate);
-  v8::Handle<v8::Context> context =
-      v8::Context::New(v8::Isolate::GetCurrent(), NULL, global);
+ v8::Handle<v8::Context> context = v8::Context::New(isolate, NULL, global);
   v8::Context::Scope context_scope(context);
   CHECK(!v8::V8::IsExecutionTerminating());
   v8::Handle<v8::String> source =
@@ -403,4 +403,3 @@ TEST(TerminateCancelTerminateFromThreadItself) {
   // Check that execution completed with correct return value.
   CHECK(v8::Script::Compile(source)->Run()->Equals(v8_str("completed")));
 }
-


--
--
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