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

Unified Diff: src/snapshot/code-serializer.cc

Issue 2586943003: [serializer] do not serialize script wrappers. (Closed)
Patch Set: Created 4 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 | test/mjsunit/regress/wasm/regression-674447.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/code-serializer.cc
diff --git a/src/snapshot/code-serializer.cc b/src/snapshot/code-serializer.cc
index 86a91643d246d5595b2cdd97497b0f8425d55c62..511f1117521b257fe4ec02c378d13d1e62c478ec 100644
--- a/src/snapshot/code-serializer.cc
+++ b/src/snapshot/code-serializer.cc
@@ -104,6 +104,12 @@ void CodeSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
return SerializeObject(isolate()->heap()->undefined_value(), how_to_code,
where_to_point, skip);
}
+
+ if (obj->IsScript()) {
+ // Wrapper object is a context-dependent JSValue. Reset it here.
+ Script::cast(obj)->set_wrapper(isolate()->heap()->undefined_value());
+ }
+
// Past this point we should not see any (context-specific) maps anymore.
CHECK(!obj->IsMap());
// There should be no references to the global object embedded.
« no previous file with comments | « no previous file | test/mjsunit/regress/wasm/regression-674447.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698