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

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

Issue 1178903003: Add script context with context-allocated "const this" (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Add test Created 5 years, 6 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
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | test/mjsunit/regress/regress-crbug-498811.js » ('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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | test/mjsunit/regress/regress-crbug-498811.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698