Commit c6519a14 authored by dcarney@chromium.org's avatar dcarney@chromium.org

update test to test new style property handlers

R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/15769014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 9b21eb91
......@@ -2811,7 +2811,10 @@ class V8EXPORT Template : public Data {
template<typename T>
class ReturnValue {
public:
V8_INLINE(explicit ReturnValue(internal::Object** slot));
template <class S> V8_INLINE(ReturnValue(const ReturnValue<S>& that))
: value_(that.value_) {
TYPE_CHECK(T, S);
};
// Handle setters
template <typename S> V8_INLINE(void Set(const Persistent<S>& handle));
template <typename S> V8_INLINE(void Set(const Handle<S> handle));
......@@ -2825,7 +2828,12 @@ class ReturnValue {
V8_INLINE(void SetUndefined());
// Convenience getter for Isolate
V8_INLINE(Isolate* GetIsolate());
private:
template<class F> friend class ReturnValue;
template<class F> friend class FunctionCallbackInfo;
template<class F> friend class PropertyCallbackInfo;
V8_INLINE(explicit ReturnValue(internal::Object** slot));
internal::Object** value_;
};
......
......@@ -2007,88 +2007,90 @@ THREADED_TEST(IndexedPropertyHandlerGetter) {
v8::Handle<v8::Object> bottom;
static v8::Handle<Value> CheckThisIndexedPropertyHandler(
static void CheckThisIndexedPropertyHandler(
uint32_t index,
const AccessorInfo& info) {
const v8::PropertyCallbackInfo<v8::Value>& info) {
CheckReturnValue(info);
ApiTestFuzzer::Fuzz();
CHECK(info.This()->Equals(bottom));
return v8::Handle<Value>();
}
static v8::Handle<Value> CheckThisNamedPropertyHandler(
static void CheckThisNamedPropertyHandler(
Local<String> name,
const AccessorInfo& info) {
const v8::PropertyCallbackInfo<v8::Value>& info) {
CheckReturnValue(info);
ApiTestFuzzer::Fuzz();
CHECK(info.This()->Equals(bottom));
return v8::Handle<Value>();
}
v8::Handle<Value> CheckThisIndexedPropertySetter(uint32_t index,
Local<Value> value,
const AccessorInfo& info) {
void CheckThisIndexedPropertySetter(
uint32_t index,
Local<Value> value,
const v8::PropertyCallbackInfo<v8::Value>& info) {
CheckReturnValue(info);
ApiTestFuzzer::Fuzz();
CHECK(info.This()->Equals(bottom));
return v8::Handle<Value>();
}
v8::Handle<Value> CheckThisNamedPropertySetter(Local<String> property,
Local<Value> value,
const AccessorInfo& info) {
void CheckThisNamedPropertySetter(
Local<String> property,
Local<Value> value,
const v8::PropertyCallbackInfo<v8::Value>& info) {
CheckReturnValue(info);
ApiTestFuzzer::Fuzz();
CHECK(info.This()->Equals(bottom));
return v8::Handle<Value>();
}
v8::Handle<v8::Integer> CheckThisIndexedPropertyQuery(
void CheckThisIndexedPropertyQuery(
uint32_t index,
const AccessorInfo& info) {
const v8::PropertyCallbackInfo<v8::Integer>& info) {
CheckReturnValue(info);
ApiTestFuzzer::Fuzz();
CHECK(info.This()->Equals(bottom));
return v8::Handle<v8::Integer>();
}
v8::Handle<v8::Integer> CheckThisNamedPropertyQuery(Local<String> property,
const AccessorInfo& info) {
void CheckThisNamedPropertyQuery(
Local<String> property,
const v8::PropertyCallbackInfo<v8::Integer>& info) {
CheckReturnValue(info);
ApiTestFuzzer::Fuzz();
CHECK(info.This()->Equals(bottom));
return v8::Handle<v8::Integer>();
}
v8::Handle<v8::Boolean> CheckThisIndexedPropertyDeleter(
void CheckThisIndexedPropertyDeleter(
uint32_t index,
const AccessorInfo& info) {
const v8::PropertyCallbackInfo<v8::Boolean>& info) {
CheckReturnValue(info);
ApiTestFuzzer::Fuzz();
CHECK(info.This()->Equals(bottom));
return v8::Handle<v8::Boolean>();
}
v8::Handle<v8::Boolean> CheckThisNamedPropertyDeleter(
void CheckThisNamedPropertyDeleter(
Local<String> property,
const AccessorInfo& info) {
const v8::PropertyCallbackInfo<v8::Boolean>& info) {
CheckReturnValue(info);
ApiTestFuzzer::Fuzz();
CHECK(info.This()->Equals(bottom));
return v8::Handle<v8::Boolean>();
}
v8::Handle<v8::Array> CheckThisIndexedPropertyEnumerator(
const AccessorInfo& info) {
void CheckThisIndexedPropertyEnumerator(
const v8::PropertyCallbackInfo<v8::Array>& info) {
CheckReturnValue(info);
ApiTestFuzzer::Fuzz();
CHECK(info.This()->Equals(bottom));
return v8::Handle<v8::Array>();
}
v8::Handle<v8::Array> CheckThisNamedPropertyEnumerator(
const AccessorInfo& info) {
void CheckThisNamedPropertyEnumerator(
const v8::PropertyCallbackInfo<v8::Array>& info) {
CheckReturnValue(info);
ApiTestFuzzer::Fuzz();
CHECK(info.This()->Equals(bottom));
return v8::Handle<v8::Array>();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment