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

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

Issue 2836623002: [inspector] always include user scripts in the snapshot. (Closed)
Patch Set: rebase 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());
76 } 79 }
77 80
78 // Object has not yet been serialized. Serialize it here. 81 // Object has not yet been serialized. Serialize it here.
79 ObjectSerializer object_serializer(this, obj, &sink_, how_to_code, 82 ObjectSerializer object_serializer(this, obj, &sink_, how_to_code,
80 where_to_point); 83 where_to_point);
81 object_serializer.Serialize(); 84 object_serializer.Serialize();
82 85
83 if (serializing_immortal_immovables_roots_ && 86 if (serializing_immortal_immovables_roots_ &&
84 root_index != RootIndexMap::kInvalidRootIndex) { 87 root_index != RootIndexMap::kInvalidRootIndex) {
85 // Make sure that the immortal immovable root has been included in the first 88 // 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
179 if (root_index == Heap::kStackLimitRootIndex || 182 if (root_index == Heap::kStackLimitRootIndex ||
180 root_index == Heap::kRealStackLimitRootIndex) { 183 root_index == Heap::kRealStackLimitRootIndex) {
181 return true; 184 return true;
182 } 185 }
183 return Heap::RootIsImmortalImmovable(root_index) != 186 return Heap::RootIsImmortalImmovable(root_index) !=
184 serializing_immortal_immovables_roots_; 187 serializing_immortal_immovables_roots_;
185 } 188 }
186 189
187 } // namespace internal 190 } // namespace internal
188 } // namespace v8 191 } // 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