| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index 856031070209f43a469bdc7420b5aac02654a9e5..fb4c20a8de44349c64911d319be88abaf1e0509d 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -805,7 +805,9 @@ void Parser::ReportMessageAt(Scanner::Location source_location,
|
| source_location.end_pos);
|
| Handle<JSArray> array = Factory::NewJSArray(args.length());
|
| for (int i = 0; i < args.length(); i++) {
|
| - SetElement(array, i, Factory::NewStringFromUtf8(CStrVector(args[i])));
|
| + SetElement(array, i,
|
| + Factory::NewStringFromUtf8(CStrVector(args[i])),
|
| + kNonStrictMode);
|
| }
|
| Handle<Object> result = Factory::NewSyntaxError(type, array);
|
| Top::Throw(*result, &location);
|
| @@ -820,7 +822,7 @@ void Parser::ReportMessageAt(Scanner::Location source_location,
|
| source_location.end_pos);
|
| Handle<JSArray> array = Factory::NewJSArray(args.length());
|
| for (int i = 0; i < args.length(); i++) {
|
| - SetElement(array, i, args[i]);
|
| + SetElement(array, i, args[i], kNonStrictMode);
|
| }
|
| Handle<Object> result = Factory::NewSyntaxError(type, array);
|
| Top::Throw(*result, &location);
|
| @@ -4040,7 +4042,8 @@ Handle<Object> JsonParser::ParseJson(Handle<String> script,
|
| if (name_opt != NULL) {
|
| SetElement(array,
|
| 0,
|
| - Factory::NewStringFromUtf8(CStrVector(name_opt)));
|
| + Factory::NewStringFromUtf8(CStrVector(name_opt)),
|
| + kNonStrictMode);
|
| }
|
| Handle<Object> result = Factory::NewSyntaxError(message, array);
|
| Top::Throw(*result, &location);
|
| @@ -4112,7 +4115,7 @@ Handle<Object> JsonParser::ParseJsonObject() {
|
| if (value.is_null()) return Handle<Object>::null();
|
| uint32_t index;
|
| if (key->AsArrayIndex(&index)) {
|
| - SetOwnElement(json_object, index, value);
|
| + SetOwnElement(json_object, index, value, kNonStrictMode);
|
| } else if (key->Equals(Heap::Proto_symbol())) {
|
| // We can't remove the __proto__ accessor since it's hardcoded
|
| // in several places. Instead go along and add the value as
|
|
|