本文整理汇总了C++中JSTestTypedefs::globalObject方法的典型用法代码示例。如果您正苦于以下问题:C++ JSTestTypedefs::globalObject方法的具体用法?C++ JSTestTypedefs::globalObject怎么用?C++ JSTestTypedefs::globalObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSTestTypedefs
的用法示例。
在下文中一共展示了JSTestTypedefs::globalObject方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: jsTestTypedefsConstructor
EncodedJSValue jsTestTypedefsConstructor(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
{
JSTestTypedefs* domObject = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(slotBase));
if (!domObject)
return throwVMTypeError(exec);
return JSValue::encode(JSTestTypedefs::getConstructor(exec->vm(), domObject->globalObject()));
}
示例2: jsTestTypedefsConstructorTestSubObj
EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(slotBase);
return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
}
示例3: jsTestTypedefsConstructorTestSubObj
EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
UNUSED_PARAM(slotBase);
if (!castedThis)
return throwVMTypeError(exec);
return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
}
示例4: jsTestTypedefsPrototypeFunctionImmutablePointFunction
EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionImmutablePointFunction(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestTypedefs", "immutablePointFunction");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
auto& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePointFunction())));
return JSValue::encode(result);
}
示例5: jsTestTypedefsConstructorTestSubObj
EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
UNUSED_PARAM(slotBase);
if (!castedThis) {
if (jsDynamicCast<JSTestTypedefsPrototype*>(slotBase)) {
ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'TestSubObj' on a non-TestTypedefs object."));
return JSValue::encode(jsUndefined());
}
return throwVMTypeError(exec);
}
return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
}
示例6: throwThisTypeError
EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction2(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestTypedefs", "stringArrayFunction2");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
auto& impl = castedThis->impl();
if (UNLIKELY(exec->argumentCount() < 1))
return throwVMError(exec, createNotEnoughArgumentsError(exec));
ExceptionCode ec = 0;
Vector<String> values(toNativeArray<String>(exec, exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = jsArray(exec, castedThis->globalObject(), impl.stringArrayFunction2(values, ec));
setDOMException(exec, ec);
return JSValue::encode(result);
}
示例7: jsTestTypedefsImmutableSerializedScriptValue
EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestTypedefsPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestTypedefs", "immutableSerializedScriptValue");
return throwGetterTypeError(*exec, "TestTypedefs", "immutableSerializedScriptValue");
}
auto& impl = castedThis->impl();
JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
return JSValue::encode(result);
}
示例8: jsTestTypedefsImmutableSerializedScriptValue
EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
UNUSED_PARAM(slotBase);
if (!castedThis)
return throwVMTypeError(exec);
UNUSED_PARAM(exec);
TestTypedefs& impl = castedThis->impl();
JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
return JSValue::encode(result);
}
示例9: jsTestTypedefsImmutableSerializedScriptValue
EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
UNUSED_PARAM(slotBase);
if (!castedThis) {
if (jsDynamicCast<JSTestTypedefsPrototype*>(slotBase)) {
ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'immutableSerializedScriptValue' on a non-TestTypedefs object."));
return JSValue::encode(jsUndefined());
}
return throwVMTypeError(exec);
}
UNUSED_PARAM(exec);
TestTypedefs& impl = castedThis->impl();
JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
return JSValue::encode(result);
}