Status: New
Owner: ----

New issue 1349 by [email protected]: v8 Interceptor can't be nesting.
http://code.google.com/p/v8/issues/detail?id=1349

when interceptor return value(type:Local<v8::Object>),a ASSERT is to be run in handles-inl.h.

v8 version:3.2.10.3
compile mode:Debug
platoform:x64
code:
CDB *pObj = new CDB();
//Interceptor
Handle<Value> OnCDBGetter(Local<String> name,const AccessorInfo &info){
  Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New();
  Local<v8::ObjectTemplate> instanceTempl = templ->InstanceTemplate();         
  instanceTempl->SetInternalFieldCount(1);
  instanceTempl->SetNamedPropertyHandler(OnSubObjGetter);
  Local<v8::Object> V8Obj = templ->GetFunction()->NewInstance();
  V8Obj->SetPointerInInternalField(0, pObj);
  return V8Obj;
}

//v8 code :Objects.cc
MaybeObject* JSObject::GetPropertyWithInterceptor(...)
{
 ....
 return *v8::Utils::OpenHandle(*result); //because assert,code exit.
}

//handles-inl.h
template <typename T>
inline T* Handle<T>::operator*() const {
  ASSERT(location_ != NULL);
ASSERT(reinterpret_cast<Address>(*location_) != kHandleZapValue);//code exit
  return *BitCast<T**>(location_);
}


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to