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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 | 540 |
541 int file_name_length = StrLength(FLAG_testing_serialization_file) + 10; | 541 int file_name_length = StrLength(FLAG_testing_serialization_file) + 10; |
542 Vector<char> startup_name = Vector<char>::New(file_name_length + 1); | 542 Vector<char> startup_name = Vector<char>::New(file_name_length + 1); |
543 OS::SNPrintF(startup_name, "%s.startup", FLAG_testing_serialization_file); | 543 OS::SNPrintF(startup_name, "%s.startup", FLAG_testing_serialization_file); |
544 | 544 |
545 { | 545 { |
546 v8::HandleScope handle_scope(v8_isolate); | 546 v8::HandleScope handle_scope(v8_isolate); |
547 v8::Local<v8::Context>::New(v8_isolate, env)->Exit(); | 547 v8::Local<v8::Context>::New(v8_isolate, env)->Exit(); |
548 } | 548 } |
549 | 549 |
550 Object* raw_context = *(v8::Utils::OpenHandle(*env)); | 550 i::Object* raw_context = *v8::Utils::OpenPersistent(env); |
551 | 551 |
552 env.Dispose(v8_isolate); | 552 env.Dispose(v8_isolate); |
553 | 553 |
554 FileByteSink startup_sink(startup_name.start()); | 554 FileByteSink startup_sink(startup_name.start()); |
555 StartupSerializer startup_serializer(&startup_sink); | 555 StartupSerializer startup_serializer(&startup_sink); |
556 startup_serializer.SerializeStrongReferences(); | 556 startup_serializer.SerializeStrongReferences(); |
557 | 557 |
558 FileByteSink partial_sink(FLAG_testing_serialization_file); | 558 FileByteSink partial_sink(FLAG_testing_serialization_file); |
559 PartialSerializer p_ser(&startup_serializer, &partial_sink); | 559 PartialSerializer p_ser(&startup_serializer, &partial_sink); |
560 p_ser.Serialize(&raw_context); | 560 p_ser.Serialize(&raw_context); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 TEST(TestThatAlwaysFails) { | 626 TEST(TestThatAlwaysFails) { |
627 bool ArtificialFailure = false; | 627 bool ArtificialFailure = false; |
628 CHECK(ArtificialFailure); | 628 CHECK(ArtificialFailure); |
629 } | 629 } |
630 | 630 |
631 | 631 |
632 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { | 632 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { |
633 bool ArtificialFailure2 = false; | 633 bool ArtificialFailure2 = false; |
634 CHECK(ArtificialFailure2); | 634 CHECK(ArtificialFailure2); |
635 } | 635 } |
OLD | NEW |