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 10242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10253 | 10253 |
10254 | 10254 |
10255 static v8::Handle<Value> ChildGetter(Local<String> name, | 10255 static v8::Handle<Value> ChildGetter(Local<String> name, |
10256 const AccessorInfo& info) { | 10256 const AccessorInfo& info) { |
10257 ApiTestFuzzer::Fuzz(); | 10257 ApiTestFuzzer::Fuzz(); |
10258 return v8_num(42); | 10258 return v8_num(42); |
10259 } | 10259 } |
10260 | 10260 |
10261 | 10261 |
10262 THREADED_TEST(Overriding) { | 10262 THREADED_TEST(Overriding) { |
| 10263 i::FLAG_es5_readonly = true; |
10263 v8::HandleScope scope; | 10264 v8::HandleScope scope; |
10264 LocalContext context; | 10265 LocalContext context; |
10265 | 10266 |
10266 // Parent template. | 10267 // Parent template. |
10267 Local<v8::FunctionTemplate> parent_templ = v8::FunctionTemplate::New(); | 10268 Local<v8::FunctionTemplate> parent_templ = v8::FunctionTemplate::New(); |
10268 Local<ObjectTemplate> parent_instance_templ = | 10269 Local<ObjectTemplate> parent_instance_templ = |
10269 parent_templ->InstanceTemplate(); | 10270 parent_templ->InstanceTemplate(); |
10270 parent_instance_templ->SetAccessor(v8_str("f"), ParentGetter); | 10271 parent_instance_templ->SetAccessor(v8_str("f"), ParentGetter); |
10271 | 10272 |
10272 // Template that inherits from the parent template. | 10273 // Template that inherits from the parent template. |
(...skipping 6315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16588 v8::V8::SetFatalErrorHandler(CountingErrorCallback); | 16589 v8::V8::SetFatalErrorHandler(CountingErrorCallback); |
16589 v8::Utils::ReportApiFailure("StringEmpty()", "Kill V8"); | 16590 v8::Utils::ReportApiFailure("StringEmpty()", "Kill V8"); |
16590 i::Isolate::Current()->TearDown(); | 16591 i::Isolate::Current()->TearDown(); |
16591 CHECK(!i::Internals::IsInitialized(isolate)); | 16592 CHECK(!i::Internals::IsInitialized(isolate)); |
16592 CHECK_EQ(1, fatal_error_callback_counter); | 16593 CHECK_EQ(1, fatal_error_callback_counter); |
16593 CHECK(v8::String::Empty().IsEmpty()); | 16594 CHECK(v8::String::Empty().IsEmpty()); |
16594 CHECK_EQ(2, fatal_error_callback_counter); | 16595 CHECK_EQ(2, fatal_error_callback_counter); |
16595 CHECK(v8::String::Empty(isolate).IsEmpty()); | 16596 CHECK(v8::String::Empty(isolate).IsEmpty()); |
16596 CHECK_EQ(3, fatal_error_callback_counter); | 16597 CHECK_EQ(3, fatal_error_callback_counter); |
16597 } | 16598 } |
OLD | NEW |