| OLD | NEW | 
|---|
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "src/snapshot/startup-serializer.h" | 5 #include "src/snapshot/startup-serializer.h" | 
| 6 | 6 | 
| 7 #include "src/objects-inl.h" | 7 #include "src/objects-inl.h" | 
| 8 #include "src/v8threads.h" | 8 #include "src/v8threads.h" | 
| 9 | 9 | 
| 10 namespace v8 { | 10 namespace v8 { | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 66   if (SerializeBackReference(obj, how_to_code, where_to_point, skip)) return; | 66   if (SerializeBackReference(obj, how_to_code, where_to_point, skip)) return; | 
| 67 | 67 | 
| 68   FlushSkip(skip); | 68   FlushSkip(skip); | 
| 69 | 69 | 
| 70   if (isolate_->external_reference_redirector() && obj->IsAccessorInfo()) { | 70   if (isolate_->external_reference_redirector() && obj->IsAccessorInfo()) { | 
| 71     // Wipe external reference redirects in the accessor info. | 71     // Wipe external reference redirects in the accessor info. | 
| 72     AccessorInfo* info = AccessorInfo::cast(obj); | 72     AccessorInfo* info = AccessorInfo::cast(obj); | 
| 73     Address original_address = Foreign::cast(info->getter())->foreign_address(); | 73     Address original_address = Foreign::cast(info->getter())->foreign_address(); | 
| 74     Foreign::cast(info->js_getter())->set_foreign_address(original_address); | 74     Foreign::cast(info->js_getter())->set_foreign_address(original_address); | 
| 75     accessor_infos_.Add(info); | 75     accessor_infos_.Add(info); | 
| 76   } else if (obj->IsScript() && Script::cast(obj)->IsUserJavaScript()) { |  | 
| 77     // Reset type for user scripts embedded in the start-up snapshot to hide |  | 
| 78     // them from the debugger. |  | 
| 79     Script::cast(obj)->set_type(Script::TYPE_EXTENSION); |  | 
| 80   } | 76   } | 
| 81 | 77 | 
| 82   // Object has not yet been serialized.  Serialize it here. | 78   // Object has not yet been serialized.  Serialize it here. | 
| 83   ObjectSerializer object_serializer(this, obj, &sink_, how_to_code, | 79   ObjectSerializer object_serializer(this, obj, &sink_, how_to_code, | 
| 84                                      where_to_point); | 80                                      where_to_point); | 
| 85   object_serializer.Serialize(); | 81   object_serializer.Serialize(); | 
| 86 | 82 | 
| 87   if (serializing_immortal_immovables_roots_ && | 83   if (serializing_immortal_immovables_roots_ && | 
| 88       root_index != RootIndexMap::kInvalidRootIndex) { | 84       root_index != RootIndexMap::kInvalidRootIndex) { | 
| 89     // Make sure that the immortal immovable root has been included in the first | 85     // Make sure that the immortal immovable root has been included in the first | 
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 183   if (root_index == Heap::kStackLimitRootIndex || | 179   if (root_index == Heap::kStackLimitRootIndex || | 
| 184       root_index == Heap::kRealStackLimitRootIndex) { | 180       root_index == Heap::kRealStackLimitRootIndex) { | 
| 185     return true; | 181     return true; | 
| 186   } | 182   } | 
| 187   return Heap::RootIsImmortalImmovable(root_index) != | 183   return Heap::RootIsImmortalImmovable(root_index) != | 
| 188          serializing_immortal_immovables_roots_; | 184          serializing_immortal_immovables_roots_; | 
| 189 } | 185 } | 
| 190 | 186 | 
| 191 }  // namespace internal | 187 }  // namespace internal | 
| 192 }  // namespace v8 | 188 }  // namespace v8 | 
| OLD | NEW | 
|---|