| OLD | NEW | 
|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3844 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3855 | 3855 | 
| 3856 | 3856 | 
| 3857   ExpectBoolean("undetectable===null", false); | 3857   ExpectBoolean("undetectable===null", false); | 
| 3858   ExpectBoolean("null===undetectable", false); | 3858   ExpectBoolean("null===undetectable", false); | 
| 3859   ExpectBoolean("undetectable===undefined", false); | 3859   ExpectBoolean("undetectable===undefined", false); | 
| 3860   ExpectBoolean("undefined===undetectable", false); | 3860   ExpectBoolean("undefined===undetectable", false); | 
| 3861   ExpectBoolean("undetectable===undetectable", true); | 3861   ExpectBoolean("undetectable===undetectable", true); | 
| 3862 } | 3862 } | 
| 3863 | 3863 | 
| 3864 | 3864 | 
|  | 3865 THREADED_TEST(VoidLiteral) { | 
|  | 3866   v8::HandleScope scope; | 
|  | 3867   LocalContext env; | 
|  | 3868 | 
|  | 3869   Local<v8::FunctionTemplate> desc = | 
|  | 3870       v8::FunctionTemplate::New(0, v8::Handle<Value>()); | 
|  | 3871   desc->InstanceTemplate()->MarkAsUndetectable();  // undetectable | 
|  | 3872 | 
|  | 3873   Local<v8::Object> obj = desc->GetFunction()->NewInstance(); | 
|  | 3874   env->Global()->Set(v8_str("undetectable"), obj); | 
|  | 3875 | 
|  | 3876   ExpectBoolean("undefined == void 0", true); | 
|  | 3877   ExpectBoolean("undetectable == void 0", true); | 
|  | 3878   ExpectBoolean("null == void 0", true); | 
|  | 3879   ExpectBoolean("undefined === void 0", true); | 
|  | 3880   ExpectBoolean("undetectable === void 0", false); | 
|  | 3881   ExpectBoolean("null === void 0", false); | 
|  | 3882 | 
|  | 3883   ExpectBoolean("void 0 == undefined", true); | 
|  | 3884   ExpectBoolean("void 0 == undetectable", true); | 
|  | 3885   ExpectBoolean("void 0 == null", true); | 
|  | 3886   ExpectBoolean("void 0 === undefined", true); | 
|  | 3887   ExpectBoolean("void 0 === undetectable", false); | 
|  | 3888   ExpectBoolean("void 0 === null", false); | 
|  | 3889 } | 
|  | 3890 | 
| 3865 | 3891 | 
| 3866 THREADED_TEST(ExtensibleOnUndetectable) { | 3892 THREADED_TEST(ExtensibleOnUndetectable) { | 
| 3867   v8::HandleScope scope; | 3893   v8::HandleScope scope; | 
| 3868   LocalContext env; | 3894   LocalContext env; | 
| 3869 | 3895 | 
| 3870   Local<v8::FunctionTemplate> desc = | 3896   Local<v8::FunctionTemplate> desc = | 
| 3871       v8::FunctionTemplate::New(0, v8::Handle<Value>()); | 3897       v8::FunctionTemplate::New(0, v8::Handle<Value>()); | 
| 3872   desc->InstanceTemplate()->MarkAsUndetectable();  // undetectable | 3898   desc->InstanceTemplate()->MarkAsUndetectable();  // undetectable | 
| 3873 | 3899 | 
| 3874   Local<v8::Object> obj = desc->GetFunction()->NewInstance(); | 3900   Local<v8::Object> obj = desc->GetFunction()->NewInstance(); | 
| (...skipping 10684 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 14559   CHECK_EQ(v8_str("DONT_CHANGE"), obj->Get(v8_str("1"))); | 14585   CHECK_EQ(v8_str("DONT_CHANGE"), obj->Get(v8_str("1"))); | 
| 14560   obj->Set(v8_num(2), v8_str("DONT_CHANGE"), v8::ReadOnly); | 14586   obj->Set(v8_num(2), v8_str("DONT_CHANGE"), v8::ReadOnly); | 
| 14561   obj->Set(v8_num(2), v8_str("foobar")); | 14587   obj->Set(v8_num(2), v8_str("foobar")); | 
| 14562   CHECK_EQ(v8_str("DONT_CHANGE"), obj->Get(v8_num(2))); | 14588   CHECK_EQ(v8_str("DONT_CHANGE"), obj->Get(v8_num(2))); | 
| 14563 | 14589 | 
| 14564   // Test non-smi case. | 14590   // Test non-smi case. | 
| 14565   obj->Set(v8_str("2000000000"), v8_str("DONT_CHANGE"), v8::ReadOnly); | 14591   obj->Set(v8_str("2000000000"), v8_str("DONT_CHANGE"), v8::ReadOnly); | 
| 14566   obj->Set(v8_str("2000000000"), v8_str("foobar")); | 14592   obj->Set(v8_str("2000000000"), v8_str("foobar")); | 
| 14567   CHECK_EQ(v8_str("DONT_CHANGE"), obj->Get(v8_str("2000000000"))); | 14593   CHECK_EQ(v8_str("DONT_CHANGE"), obj->Get(v8_str("2000000000"))); | 
| 14568 } | 14594 } | 
| OLD | NEW | 
|---|