1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:27:35 +00:00
serenity/Libraries/LibJS/Runtime
Andreas Kling 82ca7ae1f8 LibJS: Oops, "instanceof" was backwards!
Fix the "instanceof" operator to check if the constructor's prototype
property occurs anywhere in the prototype chain of the instance object.

This patch also adds Object.setPrototypeOf() to make it possible to
create a test for this bug.

Thanks to DexesTTP for pointing this out! :^)
2020-03-28 19:48:12 +01:00
..
Array.cpp LibJS: Use correct |this| value when getting/setting native properties 2020-03-24 16:14:10 +01:00
Array.h LibJS: Use correct |this| value when getting/setting native properties 2020-03-24 16:14:10 +01:00
ArrayPrototype.cpp LibJS: Add ArrayPrototype and implement Array.prototype.push() 2020-03-20 21:56:40 +01:00
ArrayPrototype.h LibJS: Add ArrayPrototype and implement Array.prototype.push() 2020-03-20 21:56:40 +01:00
Cell.cpp LibJS: Add "Heap" and "Runtime" subdirectories 2020-03-16 14:37:19 +01:00
Cell.h LibJS: Add "Heap" and "Runtime" subdirectories 2020-03-16 14:37:19 +01:00
ConsoleObject.cpp LibJS: Remove unnecessary space character at the end of console.log() 2020-03-25 14:08:47 +01:00
ConsoleObject.h LibJS: Replace the global print() function with console.log() :^) 2020-03-16 14:58:20 +01:00
Error.cpp LibJS: Implement basic exception throwing 2020-03-24 16:14:10 +01:00
Error.h LibJS: Implement basic exception throwing 2020-03-24 16:14:10 +01:00
ErrorPrototype.cpp LibJS: Remove debug spam in Error.prototype.name 2020-03-24 22:21:58 +01:00
ErrorPrototype.h LibJS: Implement basic exception throwing 2020-03-24 16:14:10 +01:00
Exception.cpp LibJS: Implement "throw" 2020-03-24 22:21:58 +01:00
Exception.h LibJS: Implement "throw" 2020-03-24 22:21:58 +01:00
Function.cpp LibJS: Add Function.prototype and make "new" Objects delegate to it 2020-03-28 16:40:36 +01:00
Function.h LibJS: Pass argument value vectors as const Vector<Value>& 2020-03-17 16:24:53 +01:00
GlobalObject.cpp LibJS: Add a global "Object" constructor 2020-03-28 17:23:54 +01:00
GlobalObject.h LibJS: Add "Heap" and "Runtime" subdirectories 2020-03-16 14:37:19 +01:00
MathObject.cpp LibJS: Use rand() for Math.random() on other systems 2020-03-23 13:14:04 +01:00
MathObject.h LibJS: Add Math.random() :^) 2020-03-21 17:52:12 +01:00
NativeFunction.cpp LibJS: Tolerate NativeFunction::call() with non-object 'this' for now 2020-03-18 17:13:22 +01:00
NativeFunction.h LibJS: Add a global "Object" constructor 2020-03-28 17:23:54 +01:00
NativeProperty.cpp LibJS: Add "Heap" and "Runtime" subdirectories 2020-03-16 14:37:19 +01:00
NativeProperty.h LibJS: Add "Heap" and "Runtime" subdirectories 2020-03-16 14:37:19 +01:00
Object.cpp LibJS: Oops, "instanceof" was backwards! 2020-03-28 19:48:12 +01:00
Object.h LibJS: Oops, "instanceof" was backwards! 2020-03-28 19:48:12 +01:00
ObjectConstructor.cpp LibJS: Oops, "instanceof" was backwards! 2020-03-28 19:48:12 +01:00
ObjectConstructor.h LibJS: Add a global "Object" constructor 2020-03-28 17:23:54 +01:00
ObjectPrototype.cpp LibJS: Pass argument value vectors as const Vector<Value>& 2020-03-17 16:24:53 +01:00
ObjectPrototype.h LibJS: Add "Heap" and "Runtime" subdirectories 2020-03-16 14:37:19 +01:00
PrimitiveString.cpp LibJS: Add "Heap" and "Runtime" subdirectories 2020-03-16 14:37:19 +01:00
PrimitiveString.h LibJS: Add "Heap" and "Runtime" subdirectories 2020-03-16 14:37:19 +01:00
ScriptFunction.cpp LibJS: Use FlyString for identifiers 2020-03-22 13:03:43 +01:00
ScriptFunction.h LibJS: Use FlyString for identifiers 2020-03-22 13:03:43 +01:00
StringObject.cpp LibJS: Add "Heap" and "Runtime" subdirectories 2020-03-16 14:37:19 +01:00
StringObject.h LibJS: Add "Heap" and "Runtime" subdirectories 2020-03-16 14:37:19 +01:00
StringPrototype.cpp LibJS: Pass argument value vectors as const Vector<Value>& 2020-03-17 16:24:53 +01:00
StringPrototype.h LibJS: Add "Heap" and "Runtime" subdirectories 2020-03-16 14:37:19 +01:00
Value.cpp LibJS: Oops, "instanceof" was backwards! 2020-03-28 19:48:12 +01:00
Value.h LibJS: Add a global "Object" constructor 2020-03-28 17:23:54 +01:00