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

Unified Diff: src/debug.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/compiler.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index e908126d895c3132c82ffe8f0aa1ecc606aac36c..f3ef93c6b9ac8ce23275c0685277c15be671c1d6 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -622,7 +622,14 @@ void ScriptCache::Add(Handle<Script> script) {
HashMap::Entry* entry =
HashMap::Lookup(reinterpret_cast<void*>(id), Hash(id), true);
if (entry->value != NULL) {
- ASSERT(*script == *reinterpret_cast<Script**>(entry->value));
+#ifdef DEBUG
+ // The code deserializer may introduce duplicate Script objects.
+ // Assert that the Script objects with the same id have the same name.
+ Handle<Script> found(reinterpret_cast<Script**>(entry->value));
+ ASSERT(script->id() == found->id());
+ ASSERT(!script->name()->IsString() ||
+ String::cast(script->name())->Equals(String::cast(found->name())));
+#endif
return;
}
// Globalize the script object, make it weak and use the location of the
« no previous file with comments | « src/compiler.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698