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

Side by Side Diff: src/serialize.cc

Issue 8536042: Extension state made per-siolate in genesis (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 Isolate* isolate = Isolate::Current(); 1128 Isolate* isolate = Isolate::Current();
1129 // No active threads. 1129 // No active threads.
1130 CHECK_EQ(NULL, Isolate::Current()->thread_manager()->FirstThreadStateInUse()); 1130 CHECK_EQ(NULL, Isolate::Current()->thread_manager()->FirstThreadStateInUse());
1131 // No active or weak handles. 1131 // No active or weak handles.
1132 CHECK(isolate->handle_scope_implementer()->blocks()->is_empty()); 1132 CHECK(isolate->handle_scope_implementer()->blocks()->is_empty());
1133 CHECK_EQ(0, isolate->global_handles()->NumberOfWeakHandles()); 1133 CHECK_EQ(0, isolate->global_handles()->NumberOfWeakHandles());
1134 // We don't support serializing installed extensions. 1134 // We don't support serializing installed extensions.
1135 for (RegisteredExtension* ext = v8::RegisteredExtension::first_extension(); 1135 for (RegisteredExtension* ext = v8::RegisteredExtension::first_extension();
1136 ext != NULL; 1136 ext != NULL;
1137 ext = ext->next()) { 1137 ext = ext->next()) {
1138 CHECK_NE(v8::INSTALLED, ext->state()); 1138 CHECK_NE(INSTALLED, isolate->extension_states()->get_state(ext));
1139 } 1139 }
1140 HEAP->IterateStrongRoots(this, VISIT_ONLY_STRONG); 1140 HEAP->IterateStrongRoots(this, VISIT_ONLY_STRONG);
1141 } 1141 }
1142 1142
1143 1143
1144 void PartialSerializer::Serialize(Object** object) { 1144 void PartialSerializer::Serialize(Object** object) {
1145 this->VisitPointer(object); 1145 this->VisitPointer(object);
1146 Isolate* isolate = Isolate::Current(); 1146 Isolate* isolate = Isolate::Current();
1147 1147
1148 // After we have done the partial serialization the partial snapshot cache 1148 // After we have done the partial serialization the partial snapshot cache
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1666 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); 1666 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize);
1667 } 1667 }
1668 } 1668 }
1669 int allocation_address = fullness_[space]; 1669 int allocation_address = fullness_[space];
1670 fullness_[space] = allocation_address + size; 1670 fullness_[space] = allocation_address + size;
1671 return allocation_address; 1671 return allocation_address;
1672 } 1672 }
1673 1673
1674 1674
1675 } } // namespace v8::internal 1675 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698