|
|
@ -150,7 +150,10 @@ void WrappedScript::Initialize(Handle<Object> target) { |
|
|
|
Local<FunctionTemplate> t = FunctionTemplate::New(WrappedScript::New); |
|
|
|
constructor_template = Persistent<FunctionTemplate>::New(t); |
|
|
|
constructor_template->InstanceTemplate()->SetInternalFieldCount(1); |
|
|
|
constructor_template->SetClassName(String::NewSymbol("Script")); |
|
|
|
// Note: We use 'NodeScript' instead of 'Script' so that we do not
|
|
|
|
// conflict with V8's Script class defined in v8/src/messages.js
|
|
|
|
// See GH-203 https://github.com/joyent/node/issues/203
|
|
|
|
constructor_template->SetClassName(String::NewSymbol("NodeScript")); |
|
|
|
|
|
|
|
NODE_SET_PROTOTYPE_METHOD(constructor_template, |
|
|
|
"createContext", |
|
|
@ -184,7 +187,7 @@ void WrappedScript::Initialize(Handle<Object> target) { |
|
|
|
"runInNewContext", |
|
|
|
WrappedScript::CompileRunInNewContext); |
|
|
|
|
|
|
|
target->Set(String::NewSymbol("Script"), |
|
|
|
target->Set(String::NewSymbol("NodeScript"), |
|
|
|
constructor_template->GetFunction()); |
|
|
|
} |
|
|
|
|
|
|
|