Limit the lifetime of handles in Map::UpdateCodeCache.
authordslomov@chromium.org <dslomov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 16 Apr 2014 12:24:01 +0000 (12:24 +0000)
committerdslomov@chromium.org <dslomov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 16 Apr 2014 12:24:01 +0000 (12:24 +0000)
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/236313014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/objects.cc

index cc0d02c..2a54d3c 100644 (file)
@@ -7514,6 +7514,7 @@ void Map::UpdateCodeCache(Handle<Map> map,
                           Handle<Name> name,
                           Handle<Code> code) {
   Isolate* isolate = map->GetIsolate();
+  HandleScope scope(isolate);
   // Allocate the code cache if not present.
   if (map->code_cache()->IsFixedArray()) {
     Handle<Object> result = isolate->factory()->NewCodeCache();