本文整理汇总了C++中JSConsole::impl方法的典型用法代码示例。如果您正苦于以下问题:C++ JSConsole::impl方法的具体用法?C++ JSConsole::impl怎么用?C++ JSConsole::impl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSConsole
的用法示例。
在下文中一共展示了JSConsole::impl方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: jsConsoleMemory
JSValue jsConsoleMemory(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSConsole* castedThis = static_cast<JSConsole*>(asObject(slotBase));
UNUSED_PARAM(exec);
Console* imp = static_cast<Console*>(castedThis->impl());
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->memory()));
return result;
}
示例2: isReachableFromOpaqueRoots
bool JSConsoleOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSConsole* jsConsole = static_cast<JSConsole*>(handle.get().asCell());
if (!isObservable(jsConsole))
return false;
Frame* root = jsConsole->impl()->frame();
if (!root)
return false;
return visitor.containsOpaqueRoot(root);
}
示例3: jsConsolePrototypeFunctionGroupEnd
EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionGroupEnd(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSConsole::s_info))
return throwVMTypeError(exec);
JSConsole* castedThis = static_cast<JSConsole*>(asObject(thisValue));
Console* imp = static_cast<Console*>(castedThis->impl());
imp->groupEnd();
return JSValue::encode(jsUndefined());
}
示例4: jsConsolePrototypeFunctionGroupEnd
JSValue JSC_HOST_CALL jsConsolePrototypeFunctionGroupEnd(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
if (!thisValue.inherits(&JSConsole::s_info))
return throwError(exec, TypeError);
JSConsole* castedThisObj = static_cast<JSConsole*>(asObject(thisValue));
Console* imp = static_cast<Console*>(castedThisObj->impl());
imp->groupEnd();
return jsUndefined();
}
示例5: jsConsolePrototypeFunctionTime
JSValue JSC_HOST_CALL jsConsolePrototypeFunctionTime(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
if (!thisValue.inherits(&JSConsole::s_info))
return throwError(exec, TypeError);
JSConsole* castedThisObj = static_cast<JSConsole*>(asObject(thisValue));
Console* imp = static_cast<Console*>(castedThisObj->impl());
const UString& title = valueToStringWithUndefinedOrNullCheck(exec, args.at(0));
imp->time(title);
return jsUndefined();
}
示例6: jsConsolePrototypeFunctionAssert
JSValue JSC_HOST_CALL jsConsolePrototypeFunctionAssert(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
if (!thisValue.inherits(&JSConsole::s_info))
return throwError(exec, TypeError);
JSConsole* castedThisObj = static_cast<JSConsole*>(asObject(thisValue));
Console* imp = static_cast<Console*>(castedThisObj->impl());
ScriptCallStack callStack(exec, args, 1);
bool condition = args.at(0).toBoolean(exec);
imp->assertCondition(condition, &callStack);
return jsUndefined();
}
示例7: jsConsolePrototypeFunctionGroupCollapsed
EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionGroupCollapsed(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSConsole::s_info))
return throwVMTypeError(exec);
JSConsole* castedThis = static_cast<JSConsole*>(asObject(thisValue));
Console* imp = static_cast<Console*>(castedThis->impl());
RefPtr<ScriptArguments> scriptArguments(createScriptArguments(exec, 0));
size_t maxStackSize = imp->shouldCaptureFullStackTrace() ? ScriptCallStack::maxCallStackSizeToCapture : 1;
RefPtr<ScriptCallStack> callStack(createScriptCallStack(exec, maxStackSize));
imp->groupCollapsed(scriptArguments, callStack);
return JSValue::encode(jsUndefined());
}
示例8: jsConsolePrototypeFunctionTime
EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionTime(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSConsole::s_info))
return throwVMTypeError(exec);
JSConsole* castedThis = static_cast<JSConsole*>(asObject(thisValue));
Console* imp = static_cast<Console*>(castedThis->impl());
const String& title(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->time(title);
return JSValue::encode(jsUndefined());
}
示例9: jsConsolePrototypeFunctionDebug
EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionDebug(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
JSConsole* castedThis = static_cast<JSConsole*>(asObject(thisValue));
Console* imp = static_cast<Console*>(castedThis->impl());
unsigned count = exec->argumentCount();
Vector<NPVariant, 8> cArgs(count);
unsigned i;
for (i = 0; i < count; i++)
JSC::Bindings::convertValueToNPVariant(exec, exec->argument(i), &cArgs[i]);
// Invoke the 'C' method.
bool retval = true;
NPVariant resultVariant;
VOID_TO_NPVARIANT(resultVariant);
{
JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly);
//ASSERT(JSC::Bindings::globalExceptionString().isNull());
NPInvokeFunctionPtr ptr = (NPInvokeFunctionPtr)(imp->frame()->page()->chrome()->client()->getJavascriptCallCppCallback());
retval = ptr(0, 0, cArgs.data(), count, &resultVariant);
//CInstance::moveGlobalExceptionToExecState(exec);
}
if (!retval)
throwError(exec, createError(exec, "Error calling method on NPObject."));
for (i = 0; i < count; i++)
_NPN_ReleaseVariantValue(&cArgs[i]);
JSValue resultValue = JSC::Bindings::convertNPVariantToValue(exec, &resultVariant, 0);
_NPN_ReleaseVariantValue(&resultVariant);
return resultValue;
// JSValue thisValue = exec->hostThisValue();
// if (!thisValue.inherits(&JSConsole::s_info))
// return throwVMTypeError(exec);
// JSConsole* castedThis = static_cast<JSConsole*>(asObject(thisValue));
// Console* imp = static_cast<Console*>(castedThis->impl());
// RefPtr<ScriptArguments> scriptArguments(createScriptArguments(exec, 0));
// size_t maxStackSize = imp->shouldCaptureFullStackTrace() ? ScriptCallStack::maxCallStackSizeToCapture : 1;
// RefPtr<ScriptCallStack> callStack(createScriptCallStack(exec, maxStackSize));
//
// imp->debug(scriptArguments, callStack);
// return JSValue::encode(jsUndefined());
}
示例10: jsConsolePrototypeFunctionTimeEnd
EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionTimeEnd(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSConsole::s_info))
return throwVMTypeError(exec);
JSConsole* castedThis = static_cast<JSConsole*>(asObject(thisValue));
Console* imp = static_cast<Console*>(castedThis->impl());
RefPtr<ScriptArguments> scriptArguments(createScriptArguments(exec, 1));
size_t maxStackSize = imp->shouldCaptureFullStackTrace() ? ScriptCallStack::maxCallStackSizeToCapture : 1;
RefPtr<ScriptCallStack> callStack(createScriptCallStack(exec, maxStackSize));
const String& title(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->timeEnd(title, scriptArguments, callStack);
return JSValue::encode(jsUndefined());
}
示例11: finalize
void JSConsoleOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
{
JSConsole* jsConsole = static_cast<JSConsole*>(handle.get().asCell());
DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
uncacheWrapper(world, jsConsole->impl(), jsConsole);
}