| 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 Handle<JSGlobalProxy> global_proxy = | 486 Handle<JSGlobalProxy> global_proxy = |
| 487 isolate->factory()->NewUninitializedJSGlobalProxy(); | 487 isolate->factory()->NewUninitializedJSGlobalProxy(); |
| 488 { | 488 { |
| 489 SnapshotData snapshot_data(Vector<const byte>(snapshot, snapshot_size)); | 489 SnapshotData snapshot_data(Vector<const byte>(snapshot, snapshot_size)); |
| 490 Deserializer deserializer(&snapshot_data); | 490 Deserializer deserializer(&snapshot_data); |
| 491 root = | 491 root = |
| 492 deserializer.DeserializePartial(isolate, global_proxy, | 492 deserializer.DeserializePartial(isolate, global_proxy, |
| 493 &outdated_contexts).ToHandleChecked(); | 493 &outdated_contexts).ToHandleChecked(); |
| 494 CHECK(root->IsContext()); | 494 CHECK(root->IsContext()); |
| 495 CHECK(Handle<Context>::cast(root)->global_proxy() == *global_proxy); | 495 CHECK(Handle<Context>::cast(root)->global_proxy() == *global_proxy); |
| 496 CHECK_EQ(1, outdated_contexts->length()); | 496 CHECK_EQ(2, outdated_contexts->length()); |
| 497 } | 497 } |
| 498 | 498 |
| 499 Handle<Object> root2; | 499 Handle<Object> root2; |
| 500 { | 500 { |
| 501 SnapshotData snapshot_data(Vector<const byte>(snapshot, snapshot_size)); | 501 SnapshotData snapshot_data(Vector<const byte>(snapshot, snapshot_size)); |
| 502 Deserializer deserializer(&snapshot_data); | 502 Deserializer deserializer(&snapshot_data); |
| 503 root2 = | 503 root2 = |
| 504 deserializer.DeserializePartial(isolate, global_proxy, | 504 deserializer.DeserializePartial(isolate, global_proxy, |
| 505 &outdated_contexts).ToHandleChecked(); | 505 &outdated_contexts).ToHandleChecked(); |
| 506 CHECK(root2->IsContext()); | 506 CHECK(root2->IsContext()); |
| (...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1606 isolate->Dispose(); | 1606 isolate->Dispose(); |
| 1607 } | 1607 } |
| 1608 | 1608 |
| 1609 | 1609 |
| 1610 TEST(SerializationMemoryStats) { | 1610 TEST(SerializationMemoryStats) { |
| 1611 FLAG_profile_deserialization = true; | 1611 FLAG_profile_deserialization = true; |
| 1612 FLAG_always_opt = false; | 1612 FLAG_always_opt = false; |
| 1613 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob(); | 1613 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob(); |
| 1614 delete[] blob.data; | 1614 delete[] blob.data; |
| 1615 } | 1615 } |
| OLD | NEW |