本文整理汇总了C++中v8::Handle::NewInstance方法的典型用法代码示例。如果您正苦于以下问题:C++ Handle::NewInstance方法的具体用法?C++ Handle::NewInstance怎么用?C++ Handle::NewInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类v8::Handle
的用法示例。
在下文中一共展示了Handle::NewInstance方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: scope
v8::Local<v8::Object> V8ScriptRunner::instantiateObjectInDocument(v8::Isolate* isolate, v8::Handle<v8::Function> function, ExecutionContext* context, int argc, v8::Handle<v8::Value> argv[])
{
TRACE_EVENT0("v8", "v8.newInstance");
TRACE_EVENT_SCOPED_SAMPLING_STATE("V8", "V8Execution");
V8RecursionScope scope(isolate, context);
v8::Local<v8::Object> result = function->NewInstance(argc, argv);
crashIfV8IsDead();
return result;
}
示例2:
v8::Local<v8::Object> V8ObjectConstructor::newInstance(v8::Handle<v8::Function> function, int argc, v8::Handle<v8::Value> argv[])
{
if (function.IsEmpty())
return v8::Local<v8::Object>();
ConstructorMode constructorMode;
V8RecursionScope::MicrotaskSuppression scope;
v8::Local<v8::Object> result = function->NewInstance(argc, argv);
crashIfV8IsDead();
return result;
}
示例3: recursionScope
v8::Local<v8::Object> V8ObjectConstructor::newInstanceInDocument(v8::Handle<v8::Function> function, int argc, v8::Handle<v8::Value> argv[], Document* document)
{
#if PLATFORM(CHROMIUM)
TRACE_EVENT0("v8", "v8.newInstance");
#endif
// No artificial limitations on the depth of recursion.
V8RecursionScope recursionScope(document);
v8::Local<v8::Object> result = function->NewInstance(argc, argv);
crashIfV8IsDead();
return result;
}
示例4:
v8::Local<v8::Value> V8Proxy::newInstance(v8::Handle<v8::Function> constructor, int argc, v8::Handle<v8::Value> args[])
{
// No artificial limitations on the depth of recursion, see comment in
// V8Proxy::callFunction.
v8::Local<v8::Value> result;
{
// See comment in V8Proxy::callFunction.
m_frame->keepAlive();
result = constructor->NewInstance(argc, args);
}
if (v8::V8::IsDead())
handleFatalErrorInV8();
return result;
}
示例5: PLATFORM
v8::Local<v8::Value> V8Proxy::newInstance(v8::Handle<v8::Function> constructor, int argc, v8::Handle<v8::Value> args[])
{
#if PLATFORM(CHROMIUM)
TRACE_EVENT0("v8", "v8.newInstance");
#endif
// No artificial limitations on the depth of recursion, see comment in
// V8Proxy::callFunction.
v8::Local<v8::Value> result;
{
result = constructor->NewInstance(argc, args);
}
if (v8::V8::IsDead())
handleFatalErrorInV8();
return result;
}