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

Unified Diff: src/bootstrapper.cc

Issue 139983003: Revert "Make Function.length and Function.name configurable properties." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 | « no previous file | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 62109b5ae5c2fa284600dbdb093e3b5594fa4a40..ef802ba987c8208a1a3559597c8029f450ed5c7b 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -426,32 +426,31 @@ void Genesis::SetFunctionInstanceDescriptor(
if (prototypeMode != DONT_ADD_PROTOTYPE) {
prototype = factory()->NewForeign(&Accessors::FunctionPrototype);
}
- PropertyAttributes ro_attribs = static_cast<PropertyAttributes>(
+ PropertyAttributes attribs = static_cast<PropertyAttributes>(
DONT_ENUM | DONT_DELETE | READ_ONLY);
- PropertyAttributes roc_attribs = static_cast<PropertyAttributes>(
- DONT_ENUM | READ_ONLY);
map->set_instance_descriptors(*descriptors);
{ // Add length.
- CallbacksDescriptor d(*factory()->length_string(), *length, roc_attribs);
+ CallbacksDescriptor d(*factory()->length_string(), *length, attribs);
map->AppendDescriptor(&d, witness);
}
{ // Add name.
- CallbacksDescriptor d(*factory()->name_string(), *name, roc_attribs);
+ CallbacksDescriptor d(*factory()->name_string(), *name, attribs);
map->AppendDescriptor(&d, witness);
}
{ // Add arguments.
- CallbacksDescriptor d(*factory()->arguments_string(), *args, ro_attribs);
+ CallbacksDescriptor d(*factory()->arguments_string(), *args, attribs);
map->AppendDescriptor(&d, witness);
}
{ // Add caller.
- CallbacksDescriptor d(*factory()->caller_string(), *caller, ro_attribs);
+ CallbacksDescriptor d(*factory()->caller_string(), *caller, attribs);
map->AppendDescriptor(&d, witness);
}
if (prototypeMode != DONT_ADD_PROTOTYPE) {
// Add prototype.
- PropertyAttributes attribs = (prototypeMode == ADD_WRITEABLE_PROTOTYPE)
- ? static_cast<PropertyAttributes>(ro_attribs & ~READ_ONLY) : ro_attribs;
+ if (prototypeMode == ADD_WRITEABLE_PROTOTYPE) {
+ attribs = static_cast<PropertyAttributes>(attribs & ~READ_ONLY);
+ }
CallbacksDescriptor d(*factory()->prototype_string(), *prototype, attribs);
map->AppendDescriptor(&d, witness);
}
@@ -569,16 +568,14 @@ void Genesis::SetStrictFunctionInstanceDescriptor(
static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE);
PropertyAttributes ro_attribs =
static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY);
- PropertyAttributes roc_attribs =
- static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY);
map->set_instance_descriptors(*descriptors);
{ // Add length.
- CallbacksDescriptor d(*factory()->length_string(), *length, roc_attribs);
+ CallbacksDescriptor d(*factory()->length_string(), *length, ro_attribs);
map->AppendDescriptor(&d, witness);
}
{ // Add name.
- CallbacksDescriptor d(*factory()->name_string(), *name, roc_attribs);
+ CallbacksDescriptor d(*factory()->name_string(), *name, ro_attribs);
map->AppendDescriptor(&d, witness);
}
{ // Add arguments.
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698