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

Unified Diff: src/heap.cc

Issue 12937004: Add more instrumentation for Code::CopyFrom crasher. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Jakob Kummerow. Created 7 years, 9 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 | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 67759e67b63aee8552c827f92e2c68add42d02f2..e32391381b9282545bcf087549628e183388a28e 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -3805,6 +3805,8 @@ MaybeObject* Heap::CreateCode(const CodeDesc& desc,
}
// Allow self references to created code object by patching the handle to
// point to the newly allocated Code object.
+ CHECK(code->IsCode());
+ CHECK(code->relocation_info()->IsByteArray());
if (!self_reference.is_null()) {
*(self_reference.location()) = code;
}
@@ -3813,6 +3815,8 @@ MaybeObject* Heap::CreateCode(const CodeDesc& desc,
// that are dereferenced during the copy to point directly to the actual heap
// objects. These pointers can include references to the code object itself,
// through the self_reference parameter.
+ CHECK(code->IsCode());
+ CHECK(code->relocation_info()->IsByteArray());
code->CopyFrom(desc);
#ifdef VERIFY_HEAP
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698