[v8-juice] r2257 committed - Removing "using", added v8:: namespace qualifier. Fixes issue #32.

1 view
Skip to first unread message

v8-j...@googlecode.com

unread,
Jul 20, 2012, 6:25:45 PM7/20/12
to v8-juice-...@googlegroups.com
Revision: 2257
Author: sgbeal
Date: Fri Jul 20 15:25:29 2012
Log: Removing "using", added v8:: namespace qualifier. Fixes issue #32.
http://code.google.com/p/v8-juice/source/detail?r=2257

Modified:
/convert/include/cvv8/ClassCreator.hpp

=======================================
--- /convert/include/cvv8/ClassCreator.hpp Sun Feb 19 05:46:44 2012
+++ /convert/include/cvv8/ClassCreator.hpp Fri Jul 20 15:25:29 2012
@@ -621,9 +621,8 @@

static void weak_dtor( v8::Persistent< v8::Value > pv, void *nobj )
{
- using namespace v8;
//std::cerr << "Entering weak_dtor<>(native="<<(void const
*)nobj<<")\n";
- Local<Object> jobj( Object::Cast(*pv) );
+ v8::Local<v8::Object> jobj( v8::Object::Cast(*pv) );
typedef typename JSToNative<T>::ResultType NT;
NT native = CastFromJS<T>( pv );
if( !native )
@@ -691,10 +690,10 @@
}
else
{
- nholder->SetInternalField(
InternalFields::NativeIndex, Null() );
+ nholder->SetInternalField(
InternalFields::NativeIndex, v8::Null() );
if( 0 <= InternalFields::TypeIDIndex )
{
- nholder->SetInternalField(
InternalFields::TypeIDIndex, Null() );
+ nholder->SetInternalField(
InternalFields::TypeIDIndex, v8::Null() );
}
Factory::Delete(native);
}
@@ -724,7 +723,6 @@
*/
static v8::Handle<v8::Value> ctor_proxy( v8::Arguments const &
argv )
{
- using namespace v8;
if(ClassCreator_AllowCtorWithoutNew<T>::Value)
{
/**
@@ -734,8 +732,8 @@
if (!argv.IsConstructCall())
{
const int argc = argv.Length();
- Handle<Function> ctor( Function::Cast(*argv.Callee()));
- std::vector< Handle<Value> >
av(static_cast<size_t>(argc),Undefined());
+ v8::Handle<v8::Function> ctor(
v8::Function::Cast(*argv.Callee()));
+ std::vector< v8::Handle<v8::Value> >
av(static_cast<size_t>(argc),v8::Undefined());
for( int i = 0; i < argc; ++i ) av[i] = argv[i];
return ctor->NewInstance( argc, &av[0] );
}
@@ -753,7 +751,7 @@
return Toss("This constructor cannot be called as
function!");
}
}
- Local<Object> const & jobj( argv.This()
+ v8::Local<v8::Object> const & jobj( argv.This()
/*CastToJS<T>(*nobj)

We are not yet far enough
@@ -763,7 +761,7 @@
case, anyway.
*/);
if( jobj.IsEmpty() ) return jobj /* assume exception*/;
- Persistent<Object> self( Persistent<Object>::New(jobj) );
+ v8::Persistent<v8::Object> self(
v8::Persistent<v8::Object>::New(jobj) );
T * nobj = NULL;
try
{
Reply all
Reply to author
Forward
0 new messages