Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: src/api-arguments.h

Issue 2397603003: [runtime] Let native setters have a return value. (Closed)
Patch Set: Ouch. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/accessors.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_API_ARGUMENTS_H_ 5 #ifndef V8_API_ARGUMENTS_H_
6 #define V8_API_ARGUMENTS_H_ 6 #define V8_API_ARGUMENTS_H_
7 7
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 : Super(isolate) { 81 : Super(isolate) {
82 Object** values = this->begin(); 82 Object** values = this->begin();
83 values[T::kThisIndex] = self; 83 values[T::kThisIndex] = self;
84 values[T::kHolderIndex] = holder; 84 values[T::kHolderIndex] = holder;
85 values[T::kDataIndex] = data; 85 values[T::kDataIndex] = data;
86 values[T::kIsolateIndex] = reinterpret_cast<Object*>(isolate); 86 values[T::kIsolateIndex] = reinterpret_cast<Object*>(isolate);
87 values[T::kShouldThrowOnErrorIndex] = 87 values[T::kShouldThrowOnErrorIndex] =
88 Smi::FromInt(should_throw == Object::THROW_ON_ERROR ? 1 : 0); 88 Smi::FromInt(should_throw == Object::THROW_ON_ERROR ? 1 : 0);
89 89
90 // Here the hole is set as default value. 90 // Here the hole is set as default value.
91 // It cannot escape into js as it's remove in Call below. 91 // It cannot escape into js as it's removed in Call below.
92 values[T::kReturnValueDefaultValueIndex] = 92 values[T::kReturnValueDefaultValueIndex] =
93 isolate->heap()->the_hole_value(); 93 isolate->heap()->the_hole_value();
94 values[T::kReturnValueIndex] = isolate->heap()->the_hole_value(); 94 values[T::kReturnValueIndex] = isolate->heap()->the_hole_value();
95 DCHECK(values[T::kHolderIndex]->IsHeapObject()); 95 DCHECK(values[T::kHolderIndex]->IsHeapObject());
96 DCHECK(values[T::kIsolateIndex]->IsSmi()); 96 DCHECK(values[T::kIsolateIndex]->IsSmi());
97 } 97 }
98 98
99 /* 99 /*
100 * The following Call functions wrap the calling of all callbacks to handle 100 * The following Call functions wrap the calling of all callbacks to handle
101 * calling either the old or the new style callbacks depending on which one 101 * calling either the old or the new style callbacks depending on which one
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 private: 190 private:
191 internal::Object** argv_; 191 internal::Object** argv_;
192 int argc_; 192 int argc_;
193 }; 193 };
194 194
195 } // namespace internal 195 } // namespace internal
196 } // namespace v8 196 } // namespace v8
197 197
198 #endif // V8_API_ARGUMENTS_H_ 198 #endif // V8_API_ARGUMENTS_H_
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698