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

Side by Side Diff: src/snapshot/startup-serializer.cc

Issue 2840923002: Revert of [inspector] always include user scripts in the snapshot. (Closed)
Patch Set: Created 3 years, 7 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/inspector/v8-debugger-script.cc ('k') | test/inspector/debugger/step-snapshot.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 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
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 Script::cast(obj)->set_context_data(
78 isolate_->heap()->uninitialized_symbol());
79 } 76 }
80 77
81 // Object has not yet been serialized. Serialize it here. 78 // Object has not yet been serialized. Serialize it here.
82 ObjectSerializer object_serializer(this, obj, &sink_, how_to_code, 79 ObjectSerializer object_serializer(this, obj, &sink_, how_to_code,
83 where_to_point); 80 where_to_point);
84 object_serializer.Serialize(); 81 object_serializer.Serialize();
85 82
86 if (serializing_immortal_immovables_roots_ && 83 if (serializing_immortal_immovables_roots_ &&
87 root_index != RootIndexMap::kInvalidRootIndex) { 84 root_index != RootIndexMap::kInvalidRootIndex) {
88 // 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
182 if (root_index == Heap::kStackLimitRootIndex || 179 if (root_index == Heap::kStackLimitRootIndex ||
183 root_index == Heap::kRealStackLimitRootIndex) { 180 root_index == Heap::kRealStackLimitRootIndex) {
184 return true; 181 return true;
185 } 182 }
186 return Heap::RootIsImmortalImmovable(root_index) != 183 return Heap::RootIsImmortalImmovable(root_index) !=
187 serializing_immortal_immovables_roots_; 184 serializing_immortal_immovables_roots_;
188 } 185 }
189 186
190 } // namespace internal 187 } // namespace internal
191 } // namespace v8 188 } // namespace v8
OLDNEW
« no previous file with comments | « src/inspector/v8-debugger-script.cc ('k') | test/inspector/debugger/step-snapshot.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698