Index: src/code-stubs.cc |
diff --git a/src/code-stubs.cc b/src/code-stubs.cc |
index 35fb1fe74ef621f757233d942c7bc4e8458e88c7..a70ea8915bac54f873b9126e7dc2e47aad56c059 100644 |
--- a/src/code-stubs.cc |
+++ b/src/code-stubs.cc |
@@ -164,6 +164,9 @@ Handle<Code> CodeStub::GetCode() { |
{ |
HandleScope scope(isolate()); |
+ // Canonicalize handles, so that we can share constant pool entries pointing |
+ // to code targets without dereferencing their handles. |
+ CanonicalHandleScope canonical(isolate()); |
Handle<Code> new_object = GenerateCode(); |
new_object->set_stub_key(GetKey()); |