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 18784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18795 v8::HandleScope scope(context->GetIsolate()); | 18795 v8::HandleScope scope(context->GetIsolate()); |
18796 Local<Value> set_value = CompileRun("new Set();"); | 18796 Local<Value> set_value = CompileRun("new Set();"); |
18797 Local<Object> set_object(Object::Cast(*set_value)); | 18797 Local<Object> set_object(Object::Cast(*set_value)); |
18798 CHECK_EQ(0, set_object->InternalFieldCount()); | 18798 CHECK_EQ(0, set_object->InternalFieldCount()); |
18799 Local<Value> map_value = CompileRun("new Map();"); | 18799 Local<Value> map_value = CompileRun("new Map();"); |
18800 Local<Object> map_object(Object::Cast(*map_value)); | 18800 Local<Object> map_object(Object::Cast(*map_value)); |
18801 CHECK_EQ(0, map_object->InternalFieldCount()); | 18801 CHECK_EQ(0, map_object->InternalFieldCount()); |
18802 } | 18802 } |
18803 | 18803 |
18804 | 18804 |
| 18805 THREADED_TEST(Regress260106) { |
| 18806 LocalContext context; |
| 18807 v8::HandleScope scope(context->GetIsolate()); |
| 18808 Local<FunctionTemplate> templ = FunctionTemplate::New(DummyCallHandler); |
| 18809 CompileRun("for (var i = 0; i < 128; i++) Object.prototype[i] = 0;"); |
| 18810 Local<Function> function = templ->GetFunction(); |
| 18811 CHECK(!function.IsEmpty()); |
| 18812 CHECK(function->IsFunction()); |
| 18813 } |
| 18814 |
| 18815 |
18805 #ifndef WIN32 | 18816 #ifndef WIN32 |
18806 class ThreadInterruptTest { | 18817 class ThreadInterruptTest { |
18807 public: | 18818 public: |
18808 ThreadInterruptTest() : sem_(NULL), sem_value_(0) { } | 18819 ThreadInterruptTest() : sem_(NULL), sem_value_(0) { } |
18809 ~ThreadInterruptTest() { delete sem_; } | 18820 ~ThreadInterruptTest() { delete sem_; } |
18810 | 18821 |
18811 void RunTest() { | 18822 void RunTest() { |
18812 sem_ = i::OS::CreateSemaphore(0); | 18823 sem_ = i::OS::CreateSemaphore(0); |
18813 | 18824 |
18814 InterruptThread i_thread(this); | 18825 InterruptThread i_thread(this); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18930 context1->Global()->Set(v8_str("array"), array); | 18941 context1->Global()->Set(v8_str("array"), array); |
18931 ExpectString("JSON.stringify(array)", "[\"a\",\"b\"]"); | 18942 ExpectString("JSON.stringify(array)", "[\"a\",\"b\"]"); |
18932 array->TurnOnAccessCheck(); | 18943 array->TurnOnAccessCheck(); |
18933 ExpectString("JSON.stringify(array)", "[]"); | 18944 ExpectString("JSON.stringify(array)", "[]"); |
18934 ExpectString("JSON.stringify([array])", "[[]]"); | 18945 ExpectString("JSON.stringify([array])", "[[]]"); |
18935 ExpectString("JSON.stringify({'a' : array})", "{\"a\":[]}"); | 18946 ExpectString("JSON.stringify({'a' : array})", "{\"a\":[]}"); |
18936 } | 18947 } |
18937 } | 18948 } |
18938 | 18949 |
18939 #endif // WIN32 | 18950 #endif // WIN32 |
OLD | NEW |