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

Unified Diff: src/serialize.cc

Issue 410883003: Fix debugger-related issues in the code serializer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | 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 4156dfbf626fef88ebe2ec6c55f84240bf8a869e..71bc363cf22830c65196df66c01e6eaeca603d3f 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -1962,6 +1962,13 @@ void CodeSerializer::SerializeObject(Object* o, HowToCode how_to_code,
return;
}
+ if (heap_object->IsScript()) {
+ // The wrapper cache uses a Foreign object to point to a global handle.
+ // However, the object visitor expects foreign objects to point to external
+ // references. Clear the cache to avoid this issue.
+ Script::cast(heap_object)->ClearWrapperCache();
+ }
+
if (skip != 0) {
sink_->Put(kSkip, "SkipFromSerializeObject");
sink_->PutInt(skip, "SkipDistanceFromSerializeObject");
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698