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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 | 342 |
343 static void SanityCheck() { | 343 static void SanityCheck() { |
344 Isolate* isolate = CcTest::i_isolate(); | 344 Isolate* isolate = CcTest::i_isolate(); |
345 v8::HandleScope scope(CcTest::isolate()); | 345 v8::HandleScope scope(CcTest::isolate()); |
346 #ifdef VERIFY_HEAP | 346 #ifdef VERIFY_HEAP |
347 CcTest::heap()->Verify(); | 347 CcTest::heap()->Verify(); |
348 #endif | 348 #endif |
349 CHECK(isolate->global_object()->IsJSObject()); | 349 CHECK(isolate->global_object()->IsJSObject()); |
350 CHECK(isolate->native_context()->IsContext()); | 350 CHECK(isolate->native_context()->IsContext()); |
351 CHECK(CcTest::heap()->string_table()->IsStringTable()); | 351 CHECK(CcTest::heap()->string_table()->IsStringTable()); |
352 isolate->factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("Empty")); | 352 isolate->factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("Empty")); |
353 } | 353 } |
354 | 354 |
355 | 355 |
356 DEPENDENT_TEST(Deserialize, Serialize) { | 356 DEPENDENT_TEST(Deserialize, Serialize) { |
357 // The serialize-deserialize tests only work if the VM is built without | 357 // The serialize-deserialize tests only work if the VM is built without |
358 // serialization. That doesn't matter. We don't need to be able to | 358 // serialization. That doesn't matter. We don't need to be able to |
359 // serialize a snapshot in a VM that is booted from a snapshot. | 359 // serialize a snapshot in a VM that is booted from a snapshot. |
360 if (!Snapshot::HaveASnapshotToStartFrom()) { | 360 if (!Snapshot::HaveASnapshotToStartFrom()) { |
361 v8::Isolate* isolate = CcTest::isolate(); | 361 v8::Isolate* isolate = CcTest::isolate(); |
362 v8::HandleScope scope(isolate); | 362 v8::HandleScope scope(isolate); |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 { | 836 { |
837 DisallowCompilation no_compile(reinterpret_cast<Isolate*>(isolate2)); | 837 DisallowCompilation no_compile(reinterpret_cast<Isolate*>(isolate2)); |
838 script = v8::ScriptCompiler::CompileUnbound( | 838 script = v8::ScriptCompiler::CompileUnbound( |
839 isolate2, &source, v8::ScriptCompiler::kConsumeCodeCache); | 839 isolate2, &source, v8::ScriptCompiler::kConsumeCodeCache); |
840 } | 840 } |
841 v8::Local<v8::Value> result = script->BindToCurrentContext()->Run(); | 841 v8::Local<v8::Value> result = script->BindToCurrentContext()->Run(); |
842 CHECK(result->ToString()->Equals(v8_str("abcdef"))); | 842 CHECK(result->ToString()->Equals(v8_str("abcdef"))); |
843 } | 843 } |
844 isolate2->Dispose(); | 844 isolate2->Dispose(); |
845 } | 845 } |
OLD | NEW |