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)); }
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())); }
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); }
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); }
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); }
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); }
void DatabaseManager::logErrorMessage(ScriptExecutionContext& context, const String& message) { context.addConsoleMessage(MessageSource::Storage, MessageLevel::Error, message); }