当前位置: 首页>>代码示例>>C++>>正文


C++ JSConsole::impl方法代码示例

本文整理汇总了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;
}
开发者ID:DreamOnTheGo,项目名称:src,代码行数:8,代码来源:JSConsole.cpp

示例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);
}
开发者ID:DreamOnTheGo,项目名称:src,代码行数:10,代码来源:JSConsole.cpp

示例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());
}
开发者ID:DreamOnTheGo,项目名称:src,代码行数:11,代码来源:JSConsole.cpp

示例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();
}
开发者ID:Marforius,项目名称:qt,代码行数:11,代码来源:JSConsole.cpp

示例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();
}
开发者ID:Marforius,项目名称:qt,代码行数:12,代码来源:JSConsole.cpp

示例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();
}
开发者ID:Marforius,项目名称:qt,代码行数:13,代码来源:JSConsole.cpp

示例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());
}
开发者ID:DreamOnTheGo,项目名称:src,代码行数:14,代码来源:JSConsole.cpp

示例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());
}
开发者ID:DreamOnTheGo,项目名称:src,代码行数:14,代码来源:JSConsole.cpp

示例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());
}
开发者ID:DreamOnTheGo,项目名称:src,代码行数:49,代码来源:JSConsole.cpp

示例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());
}
开发者ID:DreamOnTheGo,项目名称:src,代码行数:17,代码来源:JSConsole.cpp

示例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);
}
开发者ID:DreamOnTheGo,项目名称:src,代码行数:6,代码来源:JSConsole.cpp


注:本文中的JSConsole::impl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。