本文整理汇总了C++中JSTestActiveDOMObject类的典型用法代码示例。如果您正苦于以下问题:C++ JSTestActiveDOMObject类的具体用法?C++ JSTestActiveDOMObject怎么用?C++ JSTestActiveDOMObject使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JSTestActiveDOMObject类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: finalize
void JSTestActiveDOMObjectOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
{
JSTestActiveDOMObject* jsTestActiveDOMObject = jsCast<JSTestActiveDOMObject*>(handle.slot()->asCell());
DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
uncacheWrapper(world, &jsTestActiveDOMObject->impl(), jsTestActiveDOMObject);
jsTestActiveDOMObject->releaseImpl();
}
示例2: jsTestActiveDOMObjectConstructor
EncodedJSValue jsTestActiveDOMObjectConstructor(ExecState* state, JSObject*, EncodedJSValue thisValue, PropertyName)
{
JSTestActiveDOMObject* domObject = jsDynamicCast<JSTestActiveDOMObject*>(JSValue::decode(thisValue));
if (!domObject)
return throwVMTypeError(state);
if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, domObject->impl()))
return JSValue::encode(jsUndefined());
return JSValue::encode(JSTestActiveDOMObject::getConstructor(state->vm(), domObject->globalObject()));
}
示例3: jsTestActiveDOMObjectExcitingAttrGetter
static inline JSValue jsTestActiveDOMObjectExcitingAttrGetter(ExecState& state, JSTestActiveDOMObject& thisObject, ThrowScope& throwScope)
{
UNUSED_PARAM(throwScope);
UNUSED_PARAM(state);
if (!BindingSecurity::shouldAllowAccessToDOMWindow(&state, thisObject.wrapped().window(), ThrowSecurityError))
return jsUndefined();
auto& impl = thisObject.wrapped();
JSValue result = toJS<IDLLong>(state, throwScope, impl.excitingAttr());
return result;
}
示例4: jsTestActiveDOMObjectExcitingAttr
EncodedJSValue jsTestActiveDOMObjectExcitingAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestActiveDOMObject* castedThis = jsCast<JSTestActiveDOMObject*>(slotBase);
if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, castedThis->impl()))
return JSValue::encode(jsUndefined());
TestActiveDOMObject& impl = castedThis->impl();
JSValue result = jsNumber(impl.excitingAttr());
return JSValue::encode(result);
}
示例5: setJSTestActiveDOMObjectConstructor
void setJSTestActiveDOMObjectConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
JSTestActiveDOMObject* domObject = jsDynamicCast<JSTestActiveDOMObject*>(JSValue::decode(thisValue));
if (UNLIKELY(!domObject)) {
throwVMTypeError(state);
return;
}
if (!shouldAllowAccessToFrame(state, domObject->wrapped().frame()))
return;
// Shadowing a built-in constructor
domObject->putDirect(state->vm(), state->propertyNames().constructor, value);
}
示例6: jsTestActiveDOMObjectExcitingAttr
EncodedJSValue jsTestActiveDOMObjectExcitingAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(state);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestActiveDOMObject* castedThis = jsDynamicCast<JSTestActiveDOMObject*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, "TestActiveDOMObject", "excitingAttr");
}
if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, castedThis->wrapped()))
return JSValue::encode(jsUndefined());
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.excitingAttr());
return JSValue::encode(result);
}
示例7: jsTestActiveDOMObjectPrototypeFunctionPostMessage
EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionPostMessage(ExecState* state)
{
JSValue thisValue = state->thisValue();
JSTestActiveDOMObject* castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*state, "TestActiveDOMObject", "postMessage");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestActiveDOMObject::info());
auto& impl = castedThis->impl();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, createNotEnoughArgumentsError(state));
String message = state->argument(0).toString(state)->value(state);
if (UNLIKELY(state->hadException()))
return JSValue::encode(jsUndefined());
impl.postMessage(message);
return JSValue::encode(jsUndefined());
}
示例8: jsTestActiveDOMObjectPrototypeFunctionExcitingFunction
EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionExcitingFunction(ExecState* state)
{
JSValue thisValue = state->thisValue();
JSTestActiveDOMObject* castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*state, "TestActiveDOMObject", "excitingFunction");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestActiveDOMObject::info());
if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, castedThis->impl()))
return JSValue::encode(jsUndefined());
auto& impl = castedThis->impl();
if (UNLIKELY(state->argumentCount() < 1))
return throwVMError(state, createNotEnoughArgumentsError(state));
Node* nextChild = JSNode::toWrapped(state->argument(0));
if (UNLIKELY(state->hadException()))
return JSValue::encode(jsUndefined());
impl.excitingFunction(nextChild);
return JSValue::encode(jsUndefined());
}