Revision: 4868
Author: [email protected]
Date: Tue Jun 15 10:26:39 2010
Log: Remove the early initialization of isolate in HandleScope().
http://code.google.com/p/v8/source/detail?r=4868

Modified:
 /branches/experimental/isolates/src/api.cc
 /branches/experimental/isolates/test/cctest/test-serialize.cc

=======================================
--- /branches/experimental/isolates/src/api.cc  Thu Jun 10 10:14:01 2010
+++ /branches/experimental/isolates/src/api.cc  Tue Jun 15 10:26:39 2010
@@ -445,9 +445,6 @@

 HandleScope::HandleScope() : is_closed_(false) {
   API_ENTRY_CHECK("HandleScope::HandleScope");
-  // Handle scope is per-isolate so we need to initialize the current one
-  // if it wasn't already.
-  EnsureInitialized("HandleScope::HandleScope");
   i::HandleScope::Enter(&previous_);
 }

=======================================
--- /branches/experimental/isolates/test/cctest/test-serialize.cc Thu Jun 10 10:14:01 2010 +++ /branches/experimental/isolates/test/cctest/test-serialize.cc Tue Jun 15 10:26:39 2010
@@ -293,6 +293,7 @@
   // serialization.  That doesn't matter.  We don't need to be able to
   // serialize a snapshot in a VM that is booted from a snapshot.
   if (!Snapshot::IsEnabled()) {
+    v8::HandleScope scope;
     Deserialize();

     v8::Persistent<v8::Context> env = v8::Context::New();
@@ -305,6 +306,7 @@

 DEPENDENT_TEST(DeserializeFromSecondSerialization, SerializeTwice) {
   if (!Snapshot::IsEnabled()) {
+    v8::HandleScope scope;
     Deserialize();

     v8::Persistent<v8::Context> env = v8::Context::New();
@@ -317,12 +319,12 @@

 DEPENDENT_TEST(DeserializeAndRunScript2, Serialize) {
   if (!Snapshot::IsEnabled()) {
+    v8::HandleScope scope;
     Deserialize();

     v8::Persistent<v8::Context> env = v8::Context::New();
     env->Enter();

-    v8::HandleScope scope;
     const char* c_source = "\"1234\".length";
     v8::Local<v8::String> source = v8::String::New(c_source);
     v8::Local<v8::Script> script = v8::Script::Compile(source);
@@ -334,12 +336,12 @@
 DEPENDENT_TEST(DeserializeFromSecondSerializationAndRunScript2,
                SerializeTwice) {
   if (!Snapshot::IsEnabled()) {
+    v8::HandleScope scope;
     Deserialize();

     v8::Persistent<v8::Context> env = v8::Context::New();
     env->Enter();

-    v8::HandleScope scope;
     const char* c_source = "\"1234\".length";
     v8::Local<v8::String> source = v8::String::New(c_source);
     v8::Local<v8::Script> script = v8::Script::Compile(source);

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to