Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1472)

Side by Side Diff: test/cctest/test-serialize.cc

Issue 12300018: Made Isolate a mandatory parameter for everything Handle-related. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed CreateCode calls. Be nicer to MIPS. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-heap-profiler.cc ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 471
472 Object* root; 472 Object* root;
473 { 473 {
474 SnapshotByteSource source(snapshot, snapshot_size); 474 SnapshotByteSource source(snapshot, snapshot_size);
475 Deserializer deserializer(&source); 475 Deserializer deserializer(&source);
476 ReserveSpaceForSnapshot(&deserializer, file_name); 476 ReserveSpaceForSnapshot(&deserializer, file_name);
477 deserializer.DeserializePartial(&root); 477 deserializer.DeserializePartial(&root);
478 CHECK(root->IsString()); 478 CHECK(root->IsString());
479 } 479 }
480 v8::HandleScope handle_scope; 480 v8::HandleScope handle_scope;
481 Handle<Object> root_handle(root); 481 Handle<Object> root_handle(root, Isolate::Current());
482 482
483 483
484 Object* root2; 484 Object* root2;
485 { 485 {
486 SnapshotByteSource source(snapshot, snapshot_size); 486 SnapshotByteSource source(snapshot, snapshot_size);
487 Deserializer deserializer(&source); 487 Deserializer deserializer(&source);
488 ReserveSpaceForSnapshot(&deserializer, file_name); 488 ReserveSpaceForSnapshot(&deserializer, file_name);
489 deserializer.DeserializePartial(&root2); 489 deserializer.DeserializePartial(&root2);
490 CHECK(root2->IsString()); 490 CHECK(root2->IsString());
491 CHECK(*root_handle == root2); 491 CHECK(*root_handle == root2);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 569
570 Object* root; 570 Object* root;
571 { 571 {
572 SnapshotByteSource source(snapshot, snapshot_size); 572 SnapshotByteSource source(snapshot, snapshot_size);
573 Deserializer deserializer(&source); 573 Deserializer deserializer(&source);
574 ReserveSpaceForSnapshot(&deserializer, file_name); 574 ReserveSpaceForSnapshot(&deserializer, file_name);
575 deserializer.DeserializePartial(&root); 575 deserializer.DeserializePartial(&root);
576 CHECK(root->IsContext()); 576 CHECK(root->IsContext());
577 } 577 }
578 v8::HandleScope handle_scope; 578 v8::HandleScope handle_scope;
579 Handle<Object> root_handle(root); 579 Handle<Object> root_handle(root, Isolate::Current());
580 580
581 581
582 Object* root2; 582 Object* root2;
583 { 583 {
584 SnapshotByteSource source(snapshot, snapshot_size); 584 SnapshotByteSource source(snapshot, snapshot_size);
585 Deserializer deserializer(&source); 585 Deserializer deserializer(&source);
586 ReserveSpaceForSnapshot(&deserializer, file_name); 586 ReserveSpaceForSnapshot(&deserializer, file_name);
587 deserializer.DeserializePartial(&root2); 587 deserializer.DeserializePartial(&root2);
588 CHECK(root2->IsContext()); 588 CHECK(root2->IsContext());
589 CHECK(*root_handle != root2); 589 CHECK(*root_handle != root2);
590 } 590 }
591 } 591 }
592 } 592 }
593 593
594 594
595 TEST(TestThatAlwaysSucceeds) { 595 TEST(TestThatAlwaysSucceeds) {
596 } 596 }
597 597
598 598
599 TEST(TestThatAlwaysFails) { 599 TEST(TestThatAlwaysFails) {
600 bool ArtificialFailure = false; 600 bool ArtificialFailure = false;
601 CHECK(ArtificialFailure); 601 CHECK(ArtificialFailure);
602 } 602 }
603 603
604 604
605 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { 605 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) {
606 bool ArtificialFailure2 = false; 606 bool ArtificialFailure2 = false;
607 CHECK(ArtificialFailure2); 607 CHECK(ArtificialFailure2);
608 } 608 }
OLDNEW
« no previous file with comments | « test/cctest/test-heap-profiler.cc ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698