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 24729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
24740 v8::Local<v8::Function> foo = v8::Local<v8::Function>::Cast( | 24740 v8::Local<v8::Function> foo = v8::Local<v8::Function>::Cast( |
24741 global_object->Get(env.local(), v8_str("boom")).ToLocalChecked()); | 24741 global_object->Get(env.local(), v8_str("boom")).ToLocalChecked()); |
24742 | 24742 |
24743 CHECK(foo->Call(env.local(), global_object, 0, NULL).IsEmpty()); | 24743 CHECK(foo->Call(env.local(), global_object, 0, NULL).IsEmpty()); |
24744 | 24744 |
24745 CHECK_EQ(1, nb_uncaught_exception_callback_calls); | 24745 CHECK_EQ(1, nb_uncaught_exception_callback_calls); |
24746 } | 24746 } |
24747 | 24747 |
24748 | 24748 |
24749 TEST(AccessCheckedIsConcatSpreadable) { | 24749 TEST(AccessCheckedIsConcatSpreadable) { |
24750 i::FLAG_harmony_concat_spreadable = true; | |
24751 v8::Isolate* isolate = CcTest::isolate(); | 24750 v8::Isolate* isolate = CcTest::isolate(); |
24752 HandleScope scope(isolate); | 24751 HandleScope scope(isolate); |
24753 LocalContext env; | 24752 LocalContext env; |
24754 | 24753 |
24755 // Object with access check | 24754 // Object with access check |
24756 Local<ObjectTemplate> spreadable_template = v8::ObjectTemplate::New(isolate); | 24755 Local<ObjectTemplate> spreadable_template = v8::ObjectTemplate::New(isolate); |
24757 spreadable_template->SetAccessCheckCallback(AccessBlocker); | 24756 spreadable_template->SetAccessCheckCallback(AccessBlocker); |
24758 spreadable_template->Set(v8::Symbol::GetIsConcatSpreadable(isolate), | 24757 spreadable_template->Set(v8::Symbol::GetIsConcatSpreadable(isolate), |
24759 v8::Boolean::New(isolate, true)); | 24758 v8::Boolean::New(isolate, true)); |
24760 Local<Object> object = | 24759 Local<Object> object = |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
24879 CHECK(proxy->GetTarget()->SameValue(target)); | 24878 CHECK(proxy->GetTarget()->SameValue(target)); |
24880 CHECK(proxy->GetHandler()->SameValue(handler)); | 24879 CHECK(proxy->GetHandler()->SameValue(handler)); |
24881 | 24880 |
24882 proxy->Revoke(); | 24881 proxy->Revoke(); |
24883 CHECK(proxy->IsProxy()); | 24882 CHECK(proxy->IsProxy()); |
24884 CHECK(!target->IsProxy()); | 24883 CHECK(!target->IsProxy()); |
24885 CHECK(proxy->IsRevoked()); | 24884 CHECK(proxy->IsRevoked()); |
24886 CHECK(proxy->GetTarget()->SameValue(target)); | 24885 CHECK(proxy->GetTarget()->SameValue(target)); |
24887 CHECK(proxy->GetHandler()->IsNull()); | 24886 CHECK(proxy->GetHandler()->IsNull()); |
24888 } | 24887 } |
OLD | NEW |