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

Unified Diff: src/handles.cc

Issue 6613005: Implementation of strict mode in SetElement. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: SetElement and strict mode. 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
Index: src/handles.cc
diff --git a/src/handles.cc b/src/handles.cc
index 05c81bb3f5241882cdddeed73331fcf4b1280c54..3946adf87ee73f5b8513b6c7f80cd2a24664a48c 100644
--- a/src/handles.cc
+++ b/src/handles.cc
@@ -265,7 +265,9 @@ Handle<Object> ForceSetProperty(Handle<JSObject> object,
Handle<Object> value,
PropertyAttributes attributes) {
CALL_HEAP_FUNCTION(
- Runtime::ForceSetObjectProperty(object, key, value, attributes), Object);
+ Runtime::ForceSetObjectProperty(
+ object, key, value,attributes),
+ Object);
}
@@ -426,7 +428,8 @@ Handle<String> SubString(Handle<String> str,
Handle<Object> SetElement(Handle<JSObject> object,
uint32_t index,
- Handle<Object> value) {
+ Handle<Object> value,
+ StrictModeFlag strict_mode) {
if (object->HasPixelElements() || object->HasExternalArrayElements()) {
if (!value->IsSmi() && !value->IsHeapNumber() && !value->IsUndefined()) {
bool has_exception;
@@ -435,16 +438,18 @@ Handle<Object> SetElement(Handle<JSObject> object,
value = number;
}
}
- CALL_HEAP_FUNCTION(object->SetElement(index, *value), Object);
+ CALL_HEAP_FUNCTION(object->SetElement(index, *value, strict_mode), Object);
}
Handle<Object> SetOwnElement(Handle<JSObject> object,
uint32_t index,
- Handle<Object> value) {
+ Handle<Object> value,
+ StrictModeFlag strict_mode) {
ASSERT(!object->HasPixelElements());
ASSERT(!object->HasExternalArrayElements());
- CALL_HEAP_FUNCTION(object->SetElement(index, *value, false), Object);
+ CALL_HEAP_FUNCTION(object->SetElement(index, *value, strict_mode, false),
+ Object);
}

Powered by Google App Engine
This is Rietveld 408576698