| 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 11652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11663 desc->InstanceTemplate()->MarkAsUndetectable(); // undetectable | 11663 desc->InstanceTemplate()->MarkAsUndetectable(); // undetectable |
| 11664 desc->InstanceTemplate()->SetCallAsFunctionHandler(ReturnThis); // callable | 11664 desc->InstanceTemplate()->SetCallAsFunctionHandler(ReturnThis); // callable |
| 11665 | 11665 |
| 11666 Local<v8::Object> obj = desc->GetFunction(env.local()) | 11666 Local<v8::Object> obj = desc->GetFunction(env.local()) |
| 11667 .ToLocalChecked() | 11667 .ToLocalChecked() |
| 11668 ->NewInstance(env.local()) | 11668 ->NewInstance(env.local()) |
| 11669 .ToLocalChecked(); | 11669 .ToLocalChecked(); |
| 11670 CHECK( | 11670 CHECK( |
| 11671 env->Global()->Set(env.local(), v8_str("undetectable"), obj).FromJust()); | 11671 env->Global()->Set(env.local(), v8_str("undetectable"), obj).FromJust()); |
| 11672 | 11672 |
| 11673 ExpectString("undetectable.toString()", "[object Object]"); | 11673 ExpectString("undetectable.toString()", "[object Function]"); |
| 11674 ExpectString("typeof undetectable", "undefined"); | 11674 ExpectString("typeof undetectable", "undefined"); |
| 11675 ExpectString("typeof(undetectable)", "undefined"); | 11675 ExpectString("typeof(undetectable)", "undefined"); |
| 11676 ExpectBoolean("typeof undetectable == 'undefined'", true); | 11676 ExpectBoolean("typeof undetectable == 'undefined'", true); |
| 11677 ExpectBoolean("typeof undetectable == 'object'", false); | 11677 ExpectBoolean("typeof undetectable == 'object'", false); |
| 11678 ExpectBoolean("if (undetectable) { true; } else { false; }", false); | 11678 ExpectBoolean("if (undetectable) { true; } else { false; }", false); |
| 11679 ExpectBoolean("!undetectable", true); | 11679 ExpectBoolean("!undetectable", true); |
| 11680 | 11680 |
| 11681 ExpectObject("true&&undetectable", obj); | 11681 ExpectObject("true&&undetectable", obj); |
| 11682 ExpectBoolean("false&&undetectable", false); | 11682 ExpectBoolean("false&&undetectable", false); |
| 11683 ExpectBoolean("true||undetectable", true); | 11683 ExpectBoolean("true||undetectable", true); |
| (...skipping 12621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 24305 CHECK(proxy->GetTarget()->SameValue(target)); | 24305 CHECK(proxy->GetTarget()->SameValue(target)); |
| 24306 CHECK(proxy->GetHandler()->SameValue(handler)); | 24306 CHECK(proxy->GetHandler()->SameValue(handler)); |
| 24307 | 24307 |
| 24308 proxy->Revoke(); | 24308 proxy->Revoke(); |
| 24309 CHECK(proxy->IsProxy()); | 24309 CHECK(proxy->IsProxy()); |
| 24310 CHECK(!target->IsProxy()); | 24310 CHECK(!target->IsProxy()); |
| 24311 CHECK(proxy->IsRevoked()); | 24311 CHECK(proxy->IsRevoked()); |
| 24312 CHECK(proxy->GetTarget()->SameValue(target)); | 24312 CHECK(proxy->GetTarget()->SameValue(target)); |
| 24313 CHECK(proxy->GetHandler()->IsNull()); | 24313 CHECK(proxy->GetHandler()->IsNull()); |
| 24314 } | 24314 } |
| OLD | NEW |