OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 9567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9578 MUST_USE_RESULT Object* GetIdentityHash(); | 9578 MUST_USE_RESULT Object* GetIdentityHash(); |
9579 | 9579 |
9580 static Handle<Smi> GetOrCreateIdentityHash(Handle<JSProxy> proxy); | 9580 static Handle<Smi> GetOrCreateIdentityHash(Handle<JSProxy> proxy); |
9581 | 9581 |
9582 private: | 9582 private: |
9583 friend class JSReceiver; | 9583 friend class JSReceiver; |
9584 | 9584 |
9585 MUST_USE_RESULT static MaybeHandle<Object> GetTrap(Handle<JSProxy> proxy, | 9585 MUST_USE_RESULT static MaybeHandle<Object> GetTrap(Handle<JSProxy> proxy, |
9586 Handle<String> trap); | 9586 Handle<String> trap); |
9587 | 9587 |
9588 // Invoke a trap by name. If the trap does not exist on this's handler, | |
9589 // but derived_trap is non-NULL, invoke that instead. May cause GC. | |
9590 MUST_USE_RESULT static MaybeHandle<Object> CallTrap( | |
9591 Handle<JSProxy> proxy, const char* name, Handle<Object> derived_trap, | |
9592 int argc, Handle<Object> args[]); | |
9593 | |
9594 DISALLOW_IMPLICIT_CONSTRUCTORS(JSProxy); | 9588 DISALLOW_IMPLICIT_CONSTRUCTORS(JSProxy); |
9595 }; | 9589 }; |
9596 | 9590 |
9597 | 9591 |
9598 class JSFunctionProxy: public JSProxy { | 9592 class JSFunctionProxy: public JSProxy { |
9599 public: | 9593 public: |
9600 // [call_trap]: The call trap. | 9594 // [call_trap]: The call trap. |
9601 DECL_ACCESSORS(call_trap, JSReceiver) | 9595 DECL_ACCESSORS(call_trap, JSReceiver) |
9602 | 9596 |
9603 // [construct_trap]: The construct trap. | 9597 // [construct_trap]: The construct trap. |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10716 } | 10710 } |
10717 return value; | 10711 return value; |
10718 } | 10712 } |
10719 }; | 10713 }; |
10720 | 10714 |
10721 | 10715 |
10722 } // NOLINT, false-positive due to second-order macros. | 10716 } // NOLINT, false-positive due to second-order macros. |
10723 } // NOLINT, false-positive due to second-order macros. | 10717 } // NOLINT, false-positive due to second-order macros. |
10724 | 10718 |
10725 #endif // V8_OBJECTS_H_ | 10719 #endif // V8_OBJECTS_H_ |
OLD | NEW |