| 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 19635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19646 v8::HandleScope scope(context->GetIsolate()); | 19646 v8::HandleScope scope(context->GetIsolate()); |
| 19647 Local<Object> obj = Object::New(); | 19647 Local<Object> obj = Object::New(); |
| 19648 Local<String> key = String::New("key"); | 19648 Local<String> key = String::New("key"); |
| 19649 obj->SetHiddenValue(key, v8::Undefined()); | 19649 obj->SetHiddenValue(key, v8::Undefined()); |
| 19650 Local<Value> value = obj->GetHiddenValue(key); | 19650 Local<Value> value = obj->GetHiddenValue(key); |
| 19651 CHECK(!value.IsEmpty()); | 19651 CHECK(!value.IsEmpty()); |
| 19652 CHECK(value->IsUndefined()); | 19652 CHECK(value->IsUndefined()); |
| 19653 } | 19653 } |
| 19654 | 19654 |
| 19655 | 19655 |
| 19656 THREADED_TEST(Regress260106) { |
| 19657 LocalContext context; |
| 19658 v8::HandleScope scope(context->GetIsolate()); |
| 19659 Local<FunctionTemplate> templ = FunctionTemplate::New(DummyCallHandler); |
| 19660 CompileRun("for (var i = 0; i < 128; i++) Object.prototype[i] = 0;"); |
| 19661 Local<Function> function = templ->GetFunction(); |
| 19662 CHECK(!function.IsEmpty()); |
| 19663 CHECK(function->IsFunction()); |
| 19664 } |
| 19665 |
| 19666 |
| 19656 #ifndef WIN32 | 19667 #ifndef WIN32 |
| 19657 class ThreadInterruptTest { | 19668 class ThreadInterruptTest { |
| 19658 public: | 19669 public: |
| 19659 ThreadInterruptTest() : sem_(NULL), sem_value_(0) { } | 19670 ThreadInterruptTest() : sem_(NULL), sem_value_(0) { } |
| 19660 ~ThreadInterruptTest() { delete sem_; } | 19671 ~ThreadInterruptTest() { delete sem_; } |
| 19661 | 19672 |
| 19662 void RunTest() { | 19673 void RunTest() { |
| 19663 sem_ = i::OS::CreateSemaphore(0); | 19674 sem_ = i::OS::CreateSemaphore(0); |
| 19664 | 19675 |
| 19665 InterruptThread i_thread(this); | 19676 InterruptThread i_thread(this); |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19885 CheckCorrectThrow("%HasProperty(other, 'x')"); | 19896 CheckCorrectThrow("%HasProperty(other, 'x')"); |
| 19886 CheckCorrectThrow("%HasElement(other, 1)"); | 19897 CheckCorrectThrow("%HasElement(other, 1)"); |
| 19887 CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')"); | 19898 CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')"); |
| 19888 CheckCorrectThrow("%GetPropertyNames(other)"); | 19899 CheckCorrectThrow("%GetPropertyNames(other)"); |
| 19889 CheckCorrectThrow("%GetLocalPropertyNames(other, true)"); | 19900 CheckCorrectThrow("%GetLocalPropertyNames(other, true)"); |
| 19890 CheckCorrectThrow("%DefineOrRedefineAccessorProperty(" | 19901 CheckCorrectThrow("%DefineOrRedefineAccessorProperty(" |
| 19891 "other, 'x', null, null, 1)"); | 19902 "other, 'x', null, null, 1)"); |
| 19892 } | 19903 } |
| 19893 | 19904 |
| 19894 #endif // WIN32 | 19905 #endif // WIN32 |
| OLD | NEW |