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

Unified Diff: src/factory.cc

Issue 1484723003: [runtime] Use "the hole" instead of smi 0 as sentinel for context extension. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 years, 1 month 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/debug/debug-scopes.cc ('k') | src/full-codegen/arm/full-codegen-arm.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 bc1d890840fbcce876eebc3d6e52715c2f60dd81..5de2f623822feced641f79ec9c938d94719b9dcc 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -764,7 +764,7 @@ Handle<Context> Factory::NewModuleContext(Handle<ScopeInfo> scope_info) {
array->set_map_no_write_barrier(*module_context_map());
// Instance link will be set later.
Handle<Context> context = Handle<Context>::cast(array);
- context->set_extension(Smi::FromInt(0));
+ context->set_extension(*the_hole_value());
return context;
}
@@ -777,7 +777,7 @@ Handle<Context> Factory::NewFunctionContext(int length,
Handle<Context> context = Handle<Context>::cast(array);
context->set_closure(*function);
context->set_previous(function->context());
- context->set_extension(Smi::FromInt(0));
+ context->set_extension(*the_hole_value());
context->set_native_context(function->native_context());
return context;
}
« no previous file with comments | « src/debug/debug-scopes.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698