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

Unified Diff: src/runtime.cc

Issue 6611003: Renaming strict to strict_mode for uniformity. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | « src/runtime.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 0c15f60f30677bc02c172b4f6929e5ac559273cd..ad2ccc3960857d7bc6191b48613e1b5dd6f5e451 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -3782,7 +3782,7 @@ MaybeObject* Runtime::SetObjectProperty(Handle<Object> object,
Handle<Object> key,
Handle<Object> value,
PropertyAttributes attr,
- StrictModeFlag strict) {
+ StrictModeFlag strict_mode) {
HandleScope scope;
if (object->IsUndefined() || object->IsNull()) {
@@ -3825,7 +3825,7 @@ MaybeObject* Runtime::SetObjectProperty(Handle<Object> object,
} else {
Handle<String> key_string = Handle<String>::cast(key);
key_string->TryFlatten();
- result = SetProperty(js_object, key_string, value, attr, strict);
+ result = SetProperty(js_object, key_string, value, attr, strict_mode);
}
if (result.is_null()) return Failure::Exception();
return *value;
@@ -3841,7 +3841,7 @@ MaybeObject* Runtime::SetObjectProperty(Handle<Object> object,
// TODO(1220): Implement SetElement strict mode.
return js_object->SetElement(index, *value);
} else {
- return js_object->SetProperty(*name, *value, attr, strict);
+ return js_object->SetProperty(*name, *value, attr, strict_mode);
}
}
@@ -3945,15 +3945,19 @@ static MaybeObject* Runtime_SetProperty(Arguments args) {
PropertyAttributes attributes =
static_cast<PropertyAttributes>(unchecked_attributes);
- StrictModeFlag strict = kNonStrictMode;
+ StrictModeFlag strict_mode = kNonStrictMode;
if (args.length() == 5) {
CONVERT_SMI_CHECKED(strict_unchecked, args[4]);
RUNTIME_ASSERT(strict_unchecked == kStrictMode ||
strict_unchecked == kNonStrictMode);
- strict = static_cast<StrictModeFlag>(strict_unchecked);
+ strict_mode = static_cast<StrictModeFlag>(strict_unchecked);
}
- return Runtime::SetObjectProperty(object, key, value, attributes, strict);
+ return Runtime::SetObjectProperty(object,
+ key,
+ value,
+ attributes,
+ strict_mode);
}
@@ -7543,8 +7547,7 @@ static MaybeObject* Runtime_StoreContextSlot(Arguments args) {
CONVERT_SMI_CHECKED(strict_unchecked, args[3]);
RUNTIME_ASSERT(strict_unchecked == kStrictMode ||
strict_unchecked == kNonStrictMode);
- StrictModeFlag strict = static_cast<StrictModeFlag>(strict_unchecked);
-
+ StrictModeFlag strict_mode = static_cast<StrictModeFlag>(strict_unchecked);
int index;
PropertyAttributes attributes;
@@ -7588,11 +7591,12 @@ static MaybeObject* Runtime_StoreContextSlot(Arguments args) {
// extension object itself.
if ((attributes & READ_ONLY) == 0 ||
(context_ext->GetLocalPropertyAttribute(*name) == ABSENT)) {
- RETURN_IF_EMPTY_HANDLE(SetProperty(context_ext, name, value, NONE, strict));
- } else if (strict == kStrictMode && (attributes & READ_ONLY) != 0) {
+ RETURN_IF_EMPTY_HANDLE(
+ SetProperty(context_ext, name, value, NONE, strict_mode));
+ } else if (strict_mode == kStrictMode && (attributes & READ_ONLY) != 0) {
// Setting read only property in strict mode.
Handle<Object> error =
- Factory::NewTypeError("strict_cannot_assign", HandleVector(&name, 1));
+ Factory::NewTypeError("strict_cannot_assign", HandleVector(&name, 1));
return Top::Throw(*error);
}
return *value;
« no previous file with comments | « src/runtime.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698