| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 21701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21712 CompileRun("other.x;"); | 21712 CompileRun("other.x;"); |
| 21713 CHECK(access_check_fail_thrown); | 21713 CHECK(access_check_fail_thrown); |
| 21714 CHECK(try_catch.HasCaught()); | 21714 CHECK(try_catch.HasCaught()); |
| 21715 } | 21715 } |
| 21716 | 21716 |
| 21717 CheckCorrectThrow("other.x"); | 21717 CheckCorrectThrow("other.x"); |
| 21718 CheckCorrectThrow("other[1]"); | 21718 CheckCorrectThrow("other[1]"); |
| 21719 CheckCorrectThrow("JSON.stringify(other)"); | 21719 CheckCorrectThrow("JSON.stringify(other)"); |
| 21720 CheckCorrectThrow("has_own_property(other, 'x')"); | 21720 CheckCorrectThrow("has_own_property(other, 'x')"); |
| 21721 CheckCorrectThrow("%GetProperty(other, 'x')"); | 21721 CheckCorrectThrow("%GetProperty(other, 'x')"); |
| 21722 CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 1, 0)"); | 21722 CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 0)"); |
| 21723 CheckCorrectThrow("%IgnoreAttributesAndSetProperty(other, 'x', 'foo')"); | 21723 CheckCorrectThrow("%AddProperty(other, 'x', 'foo', 1)"); |
| 21724 CheckCorrectThrow("%DeleteProperty(other, 'x', 0)"); | 21724 CheckCorrectThrow("%DeleteProperty(other, 'x', 0)"); |
| 21725 CheckCorrectThrow("%DeleteProperty(other, '1', 0)"); | 21725 CheckCorrectThrow("%DeleteProperty(other, '1', 0)"); |
| 21726 CheckCorrectThrow("%HasOwnProperty(other, 'x')"); | 21726 CheckCorrectThrow("%HasOwnProperty(other, 'x')"); |
| 21727 CheckCorrectThrow("%HasProperty(other, 'x')"); | 21727 CheckCorrectThrow("%HasProperty(other, 'x')"); |
| 21728 CheckCorrectThrow("%HasElement(other, 1)"); | 21728 CheckCorrectThrow("%HasElement(other, 1)"); |
| 21729 CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')"); | 21729 CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')"); |
| 21730 CheckCorrectThrow("%GetPropertyNames(other)"); | 21730 CheckCorrectThrow("%GetPropertyNames(other)"); |
| 21731 // PROPERTY_ATTRIBUTES_NONE = 0 | 21731 // PROPERTY_ATTRIBUTES_NONE = 0 |
| 21732 CheckCorrectThrow("%GetOwnPropertyNames(other, 0)"); | 21732 CheckCorrectThrow("%GetOwnPropertyNames(other, 0)"); |
| 21733 CheckCorrectThrow("%DefineOrRedefineAccessorProperty(" | 21733 CheckCorrectThrow("%DefineAccessorPropertyUnchecked(" |
| 21734 "other, 'x', null, null, 1)"); | 21734 "other, 'x', null, null, 1)"); |
| 21735 | 21735 |
| 21736 // Reset the failed access check callback so it does not influence | 21736 // Reset the failed access check callback so it does not influence |
| 21737 // the other tests. | 21737 // the other tests. |
| 21738 v8::V8::SetFailedAccessCheckCallbackFunction(NULL); | 21738 v8::V8::SetFailedAccessCheckCallbackFunction(NULL); |
| 21739 } | 21739 } |
| 21740 | 21740 |
| 21741 | 21741 |
| 21742 THREADED_TEST(Regress256330) { | 21742 THREADED_TEST(Regress256330) { |
| 21743 i::FLAG_allow_natives_syntax = true; | 21743 i::FLAG_allow_natives_syntax = true; |
| (...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22754 call_eval_context = v8::Context::New(isolate); | 22754 call_eval_context = v8::Context::New(isolate); |
| 22755 v8::Context::Scope scope(call_eval_context); | 22755 v8::Context::Scope scope(call_eval_context); |
| 22756 call_eval_bound_function = | 22756 call_eval_bound_function = |
| 22757 Local<Function>::Cast(CompileRun("eval.bind(this, '1')")); | 22757 Local<Function>::Cast(CompileRun("eval.bind(this, '1')")); |
| 22758 } | 22758 } |
| 22759 env->Global()->Set(v8_str("CallEval"), | 22759 env->Global()->Set(v8_str("CallEval"), |
| 22760 v8::FunctionTemplate::New(isolate, CallEval)->GetFunction()); | 22760 v8::FunctionTemplate::New(isolate, CallEval)->GetFunction()); |
| 22761 Local<Value> result = CompileRun("CallEval();"); | 22761 Local<Value> result = CompileRun("CallEval();"); |
| 22762 CHECK_EQ(result, v8::Integer::New(isolate, 1)); | 22762 CHECK_EQ(result, v8::Integer::New(isolate, 1)); |
| 22763 } | 22763 } |
| OLD | NEW |