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

Unified Diff: src/serialize.cc

Issue 790433002: Clear cached line ends array when serializing script object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index 7d033c920415d5490daf25eaba53bafab9cb0943..8222ff66d85cfb11cc542ff6c0b6e850303ccdff 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -1747,6 +1747,12 @@ void Serializer::ObjectSerializer::Serialize() {
PrintF("\n");
}
+ if (object_->IsScript()) {
+ // Clear cached line ends.
+ Object* undefined = serializer_->isolate()->heap()->undefined_value();
+ Script::cast(object_)->set_line_ends(undefined);
+ }
+
if (object_->IsExternalString()) {
Heap* heap = serializer_->isolate()->heap();
if (object_->map() != heap->native_source_string_map()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698