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

Side by Side Diff: src/objects.cc

Issue 1095503002: Add missing Handle to GetOrCreatePrototypeChainValidityCell (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <iomanip> 5 #include <iomanip>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 10108 matching lines...) Expand 10 before | Expand all | Expand 10 after
10119 // static 10119 // static
10120 Handle<Cell> Map::GetOrCreatePrototypeChainValidityCell(Handle<Map> map, 10120 Handle<Cell> Map::GetOrCreatePrototypeChainValidityCell(Handle<Map> map,
10121 Isolate* isolate) { 10121 Isolate* isolate) {
10122 Handle<Object> maybe_prototype(map->prototype(), isolate); 10122 Handle<Object> maybe_prototype(map->prototype(), isolate);
10123 if (!maybe_prototype->IsJSObject()) return Handle<Cell>::null(); 10123 if (!maybe_prototype->IsJSObject()) return Handle<Cell>::null();
10124 Handle<JSObject> prototype = Handle<JSObject>::cast(maybe_prototype); 10124 Handle<JSObject> prototype = Handle<JSObject>::cast(maybe_prototype);
10125 if (prototype->IsJSGlobalProxy()) { 10125 if (prototype->IsJSGlobalProxy()) {
10126 PrototypeIterator iter(isolate, prototype); 10126 PrototypeIterator iter(isolate, prototype);
10127 prototype = Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter)); 10127 prototype = Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter));
10128 } 10128 }
10129 PrototypeInfo* proto_info = 10129 Handle<PrototypeInfo> proto_info(
10130 PrototypeInfo::cast(prototype->map()->prototype_info()); 10130 PrototypeInfo::cast(prototype->map()->prototype_info()));
10131 Object* maybe_cell = proto_info->validity_cell(); 10131 Object* maybe_cell = proto_info->validity_cell();
10132 // Return existing cell if it's still valid. 10132 // Return existing cell if it's still valid.
10133 if (maybe_cell->IsCell()) { 10133 if (maybe_cell->IsCell()) {
10134 Handle<Cell> cell(Cell::cast(maybe_cell), isolate); 10134 Handle<Cell> cell(Cell::cast(maybe_cell), isolate);
10135 if (cell->value() == Smi::FromInt(Map::kPrototypeChainValid)) { 10135 if (cell->value() == Smi::FromInt(Map::kPrototypeChainValid)) {
10136 return handle(Cell::cast(maybe_cell), isolate); 10136 return handle(Cell::cast(maybe_cell), isolate);
10137 } 10137 }
10138 } 10138 }
10139 // Otherwise create a new cell. 10139 // Otherwise create a new cell.
10140 Handle<Cell> cell = isolate->factory()->NewCell( 10140 Handle<Cell> cell = isolate->factory()->NewCell(
(...skipping 7005 matching lines...) Expand 10 before | Expand all | Expand 10 after
17146 CompilationInfo* info) { 17146 CompilationInfo* info) {
17147 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( 17147 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo(
17148 handle(cell->dependent_code(), info->isolate()), 17148 handle(cell->dependent_code(), info->isolate()),
17149 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); 17149 DependentCode::kPropertyCellChangedGroup, info->object_wrapper());
17150 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 17150 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
17151 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 17151 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
17152 cell, info->zone()); 17152 cell, info->zone());
17153 } 17153 }
17154 17154
17155 } } // namespace v8::internal 17155 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698