Esempio n. 1
0
EncodedJSValue jsTestInterfaceSupplementalStr3(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis) {
        if (jsDynamicCast<JSTestInterfacePrototype*>(slotBase)) {
            ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
            scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'supplementalStr3' on a non-TestInterface object."));
            return JSValue::encode(jsUndefined());
        }
        return throwVMTypeError(exec);
    }
    return JSValue::encode(castedThis->supplementalStr3(exec));
}
Esempio n. 2
0
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()));
}
Esempio n. 3
0
EncodedJSValue jsTestInterfaceImplementsNode(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis) {
        if (jsDynamicCast<JSTestInterfacePrototype*>(slotBase)) {
            ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
            scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'implementsNode' on a non-TestInterface object."));
            return JSValue::encode(jsUndefined());
        }
        return throwVMTypeError(exec);
    }
    UNUSED_PARAM(exec);
    TestInterface& impl = castedThis->impl();
    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.implementsNode()));
    return JSValue::encode(result);
}
Esempio n. 4
0
EncodedJSValue jsTestTypedefsStringAttrWithSetterException(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 'stringAttrWithSetterException' on a non-TestTypedefs object."));
            return JSValue::encode(jsUndefined());
        }
        return throwVMTypeError(exec);
    }
    UNUSED_PARAM(exec);
    TestTypedefs& impl = castedThis->impl();
    JSValue result = jsStringWithCache(exec, impl.stringAttrWithSetterException());
    return JSValue::encode(result);
}
Esempio n. 5
0
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);
}
Esempio n. 6
0
EncodedJSValue jsTestActiveDOMObjectExcitingAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSTestActiveDOMObject* castedThis = jsDynamicCast<JSTestActiveDOMObject*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (UNLIKELY(!castedThis)) {
        if (jsDynamicCast<JSTestActiveDOMObjectPrototype*>(slotBase)) {
            ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
            scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'excitingAttr' on a non-TestActiveDOMObject object."));
            return JSValue::encode(jsUndefined());
        }
        return throwVMTypeError(exec);
    }
    if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, castedThis->impl()))
        return JSValue::encode(jsUndefined());
    UNUSED_PARAM(exec);
    TestActiveDOMObject& impl = castedThis->impl();
    JSValue result = jsNumber(impl.excitingAttr());
    return JSValue::encode(result);
}
void WorkerDebuggerAgent::addConsoleMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL)
{
    ScriptExecutionContext* context = m_inspectedWorkerGlobalScope;
    context->addConsoleMessage(source, level, message, sourceURL, 0);
}
Esempio n. 8
0
void DatabaseManager::logErrorMessage(ScriptExecutionContext& context, const String& message)
{
    context.addConsoleMessage(MessageSource::Storage, MessageLevel::Error, message);
}