5 #include "src/api-arguments.h" 7 #include "src/api-arguments-inl.h" 12 PropertyCallbackArguments::PropertyCallbackArguments(Isolate* isolate,
13 Object* data, Object*
self,
15 ShouldThrow should_throw)
17 slot_at(T::kThisIndex).store(
self);
18 slot_at(T::kHolderIndex).store(holder);
19 slot_at(T::kDataIndex).store(data);
20 slot_at(T::kIsolateIndex).store(reinterpret_cast<Object*>(isolate));
21 slot_at(T::kShouldThrowOnErrorIndex)
22 .store(Smi::FromInt(should_throw == kThrowOnError ? 1 : 0));
26 HeapObject* the_hole = ReadOnlyRoots(isolate).the_hole_value();
27 slot_at(T::kReturnValueDefaultValueIndex).store(the_hole);
28 slot_at(T::kReturnValueIndex).store(the_hole);
29 DCHECK((*slot_at(T::kHolderIndex))->IsHeapObject());
30 DCHECK((*slot_at(T::kIsolateIndex))->IsSmi());
33 FunctionCallbackArguments::FunctionCallbackArguments(
34 internal::Isolate* isolate, internal::Object* data,
35 internal::HeapObject* callee, internal::Object* holder,
36 internal::HeapObject* new_target, internal::Address* argv,
int argc)
37 : Super(isolate), argv_(argv), argc_(argc) {
38 slot_at(T::kDataIndex).store(data);
39 slot_at(T::kHolderIndex).store(holder);
40 slot_at(T::kNewTargetIndex).store(new_target);
41 slot_at(T::kIsolateIndex).store(reinterpret_cast<internal::Object*>(isolate));
44 HeapObject* the_hole = ReadOnlyRoots(isolate).the_hole_value();
45 slot_at(T::kReturnValueDefaultValueIndex).store(the_hole);
46 slot_at(T::kReturnValueIndex).store(the_hole);
47 DCHECK((*slot_at(T::kHolderIndex))->IsHeapObject());
48 DCHECK((*slot_at(T::kIsolateIndex))->IsSmi());