| OLD | NEW | 
|---|
| 1 // Copyright 2007-2010 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2010 the V8 project authors. All rights reserved. | 
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without | 
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are | 
| 4 // met: | 4 // met: | 
| 5 // | 5 // | 
| 6 //     * Redistributions of source code must retain the above copyright | 6 //     * Redistributions of source code must retain the above copyright | 
| 7 //       notice, this list of conditions and the following disclaimer. | 7 //       notice, this list of conditions and the following disclaimer. | 
| 8 //     * Redistributions in binary form must reproduce the above | 8 //     * Redistributions in binary form must reproduce the above | 
| 9 //       copyright notice, this list of conditions and the following | 9 //       copyright notice, this list of conditions and the following | 
| 10 //       disclaimer in the documentation and/or other materials provided | 10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 405     } | 405     } | 
| 406 | 406 | 
| 407     int file_name_length = StrLength(FLAG_testing_serialization_file) + 10; | 407     int file_name_length = StrLength(FLAG_testing_serialization_file) + 10; | 
| 408     Vector<char> startup_name = Vector<char>::New(file_name_length + 1); | 408     Vector<char> startup_name = Vector<char>::New(file_name_length + 1); | 
| 409     OS::SNPrintF(startup_name, "%s.startup", FLAG_testing_serialization_file); | 409     OS::SNPrintF(startup_name, "%s.startup", FLAG_testing_serialization_file); | 
| 410 | 410 | 
| 411     { | 411     { | 
| 412       v8::HandleScope handle_scope(v8_isolate); | 412       v8::HandleScope handle_scope(v8_isolate); | 
| 413       v8::Local<v8::Context>::New(v8_isolate, env)->Exit(); | 413       v8::Local<v8::Context>::New(v8_isolate, env)->Exit(); | 
| 414     } | 414     } | 
| 415     env.Dispose(v8_isolate); | 415     env.Dispose(); | 
| 416 | 416 | 
| 417     FileByteSink startup_sink(startup_name.start()); | 417     FileByteSink startup_sink(startup_name.start()); | 
| 418     StartupSerializer startup_serializer(&startup_sink); | 418     StartupSerializer startup_serializer(&startup_sink); | 
| 419     startup_serializer.SerializeStrongReferences(); | 419     startup_serializer.SerializeStrongReferences(); | 
| 420 | 420 | 
| 421     FileByteSink partial_sink(FLAG_testing_serialization_file); | 421     FileByteSink partial_sink(FLAG_testing_serialization_file); | 
| 422     PartialSerializer p_ser(&startup_serializer, &partial_sink); | 422     PartialSerializer p_ser(&startup_serializer, &partial_sink); | 
| 423     p_ser.Serialize(&raw_foo); | 423     p_ser.Serialize(&raw_foo); | 
| 424     startup_serializer.SerializeWeakReferences(); | 424     startup_serializer.SerializeWeakReferences(); | 
| 425 | 425 | 
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 551     Vector<char> startup_name = Vector<char>::New(file_name_length + 1); | 551     Vector<char> startup_name = Vector<char>::New(file_name_length + 1); | 
| 552     OS::SNPrintF(startup_name, "%s.startup", FLAG_testing_serialization_file); | 552     OS::SNPrintF(startup_name, "%s.startup", FLAG_testing_serialization_file); | 
| 553 | 553 | 
| 554     { | 554     { | 
| 555       v8::HandleScope handle_scope(v8_isolate); | 555       v8::HandleScope handle_scope(v8_isolate); | 
| 556       v8::Local<v8::Context>::New(v8_isolate, env)->Exit(); | 556       v8::Local<v8::Context>::New(v8_isolate, env)->Exit(); | 
| 557     } | 557     } | 
| 558 | 558 | 
| 559     i::Object* raw_context = *v8::Utils::OpenPersistent(env); | 559     i::Object* raw_context = *v8::Utils::OpenPersistent(env); | 
| 560 | 560 | 
| 561     env.Dispose(v8_isolate); | 561     env.Dispose(); | 
| 562 | 562 | 
| 563     FileByteSink startup_sink(startup_name.start()); | 563     FileByteSink startup_sink(startup_name.start()); | 
| 564     StartupSerializer startup_serializer(&startup_sink); | 564     StartupSerializer startup_serializer(&startup_sink); | 
| 565     startup_serializer.SerializeStrongReferences(); | 565     startup_serializer.SerializeStrongReferences(); | 
| 566 | 566 | 
| 567     FileByteSink partial_sink(FLAG_testing_serialization_file); | 567     FileByteSink partial_sink(FLAG_testing_serialization_file); | 
| 568     PartialSerializer p_ser(&startup_serializer, &partial_sink); | 568     PartialSerializer p_ser(&startup_serializer, &partial_sink); | 
| 569     p_ser.Serialize(&raw_context); | 569     p_ser.Serialize(&raw_context); | 
| 570     startup_serializer.SerializeWeakReferences(); | 570     startup_serializer.SerializeWeakReferences(); | 
| 571 | 571 | 
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 637 TEST(TestThatAlwaysFails) { | 637 TEST(TestThatAlwaysFails) { | 
| 638   bool ArtificialFailure = false; | 638   bool ArtificialFailure = false; | 
| 639   CHECK(ArtificialFailure); | 639   CHECK(ArtificialFailure); | 
| 640 } | 640 } | 
| 641 | 641 | 
| 642 | 642 | 
| 643 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { | 643 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { | 
| 644   bool ArtificialFailure2 = false; | 644   bool ArtificialFailure2 = false; | 
| 645   CHECK(ArtificialFailure2); | 645   CHECK(ArtificialFailure2); | 
| 646 } | 646 } | 
| OLD | NEW | 
|---|