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

Unified Diff: src/factory.cc

Issue 996133002: correctly invalidate global cells (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup Created 5 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 | « src/factory.h ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index aa213fd99f6dd10412fb5845af42a10bf6ba9272..f6872721b5609ed349b7b9df727dd48316ef1964 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -909,7 +909,7 @@ Handle<Cell> Factory::NewCell(Handle<Object> value) {
}
-Handle<PropertyCell> Factory::NewPropertyCellWithHole() {
+Handle<PropertyCell> Factory::NewPropertyCell() {
CALL_HEAP_FUNCTION(
isolate(),
isolate()->heap()->AllocatePropertyCell(),
@@ -917,14 +917,6 @@ Handle<PropertyCell> Factory::NewPropertyCellWithHole() {
}
-Handle<PropertyCell> Factory::NewPropertyCell(Handle<Object> value) {
- AllowDeferredHandleDereference convert_to_cell;
- Handle<PropertyCell> cell = NewPropertyCellWithHole();
- PropertyCell::SetValueInferType(cell, value);
- return cell;
-}
-
-
Handle<WeakCell> Factory::NewWeakCell(Handle<HeapObject> value) {
AllowDeferredHandleDereference convert_to_cell;
CALL_HEAP_FUNCTION(isolate(), isolate()->heap()->AllocateWeakCell(*value),
@@ -1572,10 +1564,11 @@ Handle<GlobalObject> Factory::NewGlobalObject(Handle<JSFunction> constructor) {
PropertyDetails details = descs->GetDetails(i);
// Only accessors are expected.
DCHECK_EQ(ACCESSOR_CONSTANT, details.type());
- PropertyDetails d(details.attributes(), ACCESSOR_CONSTANT, i + 1);
+ PropertyDetails d(details.attributes(), ACCESSOR_CONSTANT, i + 1,
+ PropertyCellType::kMutable);
Handle<Name> name(descs->GetKey(i));
- Handle<Object> value(descs->GetCallbacksObject(i), isolate());
- Handle<PropertyCell> cell = NewPropertyCell(value);
+ Handle<PropertyCell> cell = NewPropertyCell();
+ cell->set_value(descs->GetCallbacksObject(i));
// |dictionary| already contains enough space for all properties.
USE(NameDictionary::Add(dictionary, name, cell, d));
}
« no previous file with comments | « src/factory.h ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698