这篇教程C++ throwVMTypeError函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中throwVMTypeError函数的典型用法代码示例。如果您正苦于以下问题:C++ throwVMTypeError函数的具体用法?C++ throwVMTypeError怎么用?C++ throwVMTypeError使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了throwVMTypeError函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: regExpProtoFuncSearchEncodedJSValue JSC_HOST_CALL regExpProtoFuncSearch(ExecState* exec){ JSValue thisValue = exec->thisValue(); if (!thisValue.inherits(RegExpObject::info())) return throwVMTypeError(exec); RegExp* regExp = asRegExpObject(thisValue)->regExp(); JSString* string = exec->argument(0).toString(exec); String s = string->value(exec); if (exec->hadException()) return JSValue::encode(jsUndefined()); RegExpConstructor* regExpConstructor = exec->lexicalGlobalObject()->regExpConstructor(); MatchResult result = regExpConstructor->performMatch(exec->vm(), regExp, string, s, 0); return JSValue::encode(result ? jsNumber(result.start) : jsNumber(-1));}
开发者ID:cos2004,项目名称:webkit,代码行数:16,
示例2: jsMediaListPrototypeFunctionDeleteMediumEncodedJSValue JSC_HOST_CALL jsMediaListPrototypeFunctionDeleteMedium(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSMediaList::s_info)) return throwVMTypeError(exec); JSMediaList* castedThis = static_cast<JSMediaList*>(asObject(thisValue)); MediaList* imp = static_cast<MediaList*>(castedThis->impl()); ExceptionCode ec = 0; const String& oldMedium(ustringToString(exec->argument(0).toString(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); imp->deleteMedium(oldMedium, ec); setDOMException(exec, ec); return JSValue::encode(jsUndefined());}
开发者ID:13W,项目名称:phantomjs,代码行数:16,
示例3: jsHTMLObjectElementPrototypeFunctionGetSVGDocumentEncodedJSValue JSC_HOST_CALL jsHTMLObjectElementPrototypeFunctionGetSVGDocument(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSHTMLObjectElement::s_info)) return throwVMTypeError(exec); JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(thisValue)); HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); ExceptionCode ec = 0; if (!checkNodeSecurity(exec, imp->getSVGDocument(ec))) return JSValue::encode(jsUndefined()); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getSVGDocument(ec))); setDOMException(exec, ec); return JSValue::encode(result);}
开发者ID:13W,项目名称:phantomjs,代码行数:16,
示例4: jsDOMPluginArrayPrototypeFunctionNamedItemEncodedJSValue JSC_HOST_CALL jsDOMPluginArrayPrototypeFunctionNamedItem(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSDOMPluginArray::s_info)) return throwVMTypeError(exec); JSDOMPluginArray* castedThis = static_cast<JSDOMPluginArray*>(asObject(thisValue)); ASSERT_GC_OBJECT_INHERITS(castedThis, &JSDOMPluginArray::s_info); DOMPluginArray* imp = static_cast<DOMPluginArray*>(castedThis->impl()); const String& name(ustringToString(exec->argument(0).toString(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->namedItem(name))); return JSValue::encode(result);}
开发者ID:mulriple,项目名称:Webkit-Projects,代码行数:16,
示例5: jsTestCustomNamedGetterPrototypeFunctionAnotherFunctionEncodedJSValue JSC_HOST_CALL jsTestCustomNamedGetterPrototypeFunctionAnotherFunction(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSTestCustomNamedGetter::s_info)) return throwVMTypeError(exec); JSTestCustomNamedGetter* castedThis = jsCast<JSTestCustomNamedGetter*>(asObject(thisValue)); ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestCustomNamedGetter::s_info); TestCustomNamedGetter* impl = static_cast<TestCustomNamedGetter*>(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createNotEnoughArgumentsError(exec)); const String& str(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->anotherFunction(str); return JSValue::encode(jsUndefined());}
开发者ID:harlanlewis,项目名称:webkit,代码行数:16,
示例6: setJSCSSRuleCssTextvoid setJSCSSRuleCssText(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue){ JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(exec); JSCSSRule* castedThis = jsDynamicCast<JSCSSRule*>(JSValue::decode(thisValue)); if (!castedThis) { throwVMTypeError(exec); return; } CSSRule& impl = castedThis->impl(); ExceptionCode ec = 0; const String& nativeValue(valueToStringWithNullCheck(exec, value)); if (exec->hadException()) return; impl.setCssText(nativeValue, ec); setDOMException(exec, ec);}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:17,
示例7: jsClientRectListPrototypeFunctionItemEncodedJSValue JSC_HOST_CALL jsClientRectListPrototypeFunctionItem(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSClientRectList::s_info)) return throwVMTypeError(exec); JSClientRectList* castedThis = static_cast<JSClientRectList*>(asObject(thisValue)); ClientRectList* imp = static_cast<ClientRectList*>(castedThis->impl()); int index = exec->argument(0).toInt32(exec); if (index < 0) { setDOMException(exec, INDEX_SIZE_ERR); return JSValue::encode(jsUndefined()); } JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->item(index))); return JSValue::encode(result);}
开发者ID:youtube,项目名称:h5vcc_hh,代码行数:17,
示例8: jsDOMNamedFlowCollectionPrototypeFunctionItemEncodedJSValue JSC_HOST_CALL jsDOMNamedFlowCollectionPrototypeFunctionItem(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); JSDOMNamedFlowCollection* castedThis = jsDynamicCast<JSDOMNamedFlowCollection*>(thisValue); if (!castedThis) return throwVMTypeError(exec); ASSERT_GC_OBJECT_INHERITS(castedThis, JSDOMNamedFlowCollection::info()); DOMNamedFlowCollection& impl = castedThis->impl(); if (exec->argumentCount() < 1) return throwVMError(exec, createNotEnoughArgumentsError(exec)); unsigned index(toUInt32(exec, exec->argument(0), NormalConversion)); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.item(index))); return JSValue::encode(result);}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:17,
示例9: jsNodeIteratorPrototypeFunctionPreviousNodeEncodedJSValue JSC_HOST_CALL jsNodeIteratorPrototypeFunctionPreviousNode(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSNodeIterator::s_info)) return throwVMTypeError(exec); JSNodeIterator* castedThis = static_cast<JSNodeIterator*>(asObject(thisValue)); ASSERT_GC_OBJECT_INHERITS(castedThis, &JSNodeIterator::s_info); NodeIterator* imp = static_cast<NodeIterator*>(castedThis->impl()); ExceptionCode ec = 0; JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->previousNode(exec, ec))); setDOMException(exec, ec); if (exec->hadException()) return JSValue::encode(jsUndefined()); return JSValue::encode(result);}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:17,
示例10: jsAudioBufferSourceNodePrototypeFunctionNoteOffEncodedJSValue JSC_HOST_CALL jsAudioBufferSourceNodePrototypeFunctionNoteOff(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSAudioBufferSourceNode::s_info)) return throwVMTypeError(exec); JSAudioBufferSourceNode* castedThis = static_cast<JSAudioBufferSourceNode*>(asObject(thisValue)); ASSERT_GC_OBJECT_INHERITS(castedThis, &JSAudioBufferSourceNode::s_info); AudioBufferSourceNode* imp = static_cast<AudioBufferSourceNode*>(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); float when(exec->argument(0).toFloat(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); imp->noteOff(when); return JSValue::encode(jsUndefined());}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:17,
示例11: jsConsolePrototypeFunctionTimeEndEncodedJSValue 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,
示例12: jsNamedNodeMapPrototypeFunctionSetNamedItemNSEncodedJSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionSetNamedItemNS(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSNamedNodeMap::s_info)) return throwVMTypeError(exec); JSNamedNodeMap* castedThis = static_cast<JSNamedNodeMap*>(asObject(thisValue)); NamedNodeMap* imp = static_cast<NamedNodeMap*>(castedThis->impl()); ExceptionCode ec = 0; Node* node(toNode(exec->argument(0))); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->setNamedItemNS(node, ec))); setDOMException(exec, ec); return JSValue::encode(result);}
开发者ID:13W,项目名称:phantomjs,代码行数:17,
示例13: jsSVGDocumentPrototypeFunctionCreateEventEncodedJSValue JSC_HOST_CALL jsSVGDocumentPrototypeFunctionCreateEvent(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSSVGDocument::s_info)) return throwVMTypeError(exec); JSSVGDocument* castedThis = static_cast<JSSVGDocument*>(asObject(thisValue)); SVGDocument* imp = static_cast<SVGDocument*>(castedThis->impl()); ExceptionCode ec = 0; const String& eventType(ustringToString(exec->argument(0).toString(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->createEvent(eventType, ec))); setDOMException(exec, ec); return JSValue::encode(result);}
开发者ID:13W,项目名称:phantomjs,代码行数:17,
示例14: constructPromisestatic EncodedJSValue JSC_HOST_CALL constructPromise(ExecState* exec){ VM& vm = exec->vm(); auto scope = DECLARE_THROW_SCOPE(vm); JSGlobalObject* globalObject = exec->jsCallee()->globalObject(); JSValue newTarget = exec->newTarget(); if (newTarget.isUndefined()) return throwVMTypeError(exec, scope); Structure* promiseStructure = InternalFunction::createSubclassStructure(exec, exec->newTarget(), globalObject->promiseStructure()); RETURN_IF_EXCEPTION(scope, encodedJSValue()); JSPromise* promise = JSPromise::create(vm, promiseStructure); promise->initialize(exec, globalObject, exec->argument(0)); return JSValue::encode(promise);}
开发者ID:mjparme,项目名称:openjdk-jfx,代码行数:17,
示例15: jsConsolePrototypeFunctionAssertEncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionAssert(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)); bool condition(exec->argument(0).toBoolean(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); imp->assertCondition(condition, scriptArguments, callStack); return JSValue::encode(jsUndefined());}
开发者ID:DreamOnTheGo,项目名称:src,代码行数:17,
示例16: jsHTMLKeygenElementPrototypeFunctionSetCustomValidityEncodedJSValue JSC_HOST_CALL jsHTMLKeygenElementPrototypeFunctionSetCustomValidity(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSHTMLKeygenElement::s_info)) return throwVMTypeError(exec); JSHTMLKeygenElement* castedThis = static_cast<JSHTMLKeygenElement*>(asObject(thisValue)); ASSERT_GC_OBJECT_INHERITS(castedThis, &JSHTMLKeygenElement::s_info); HTMLKeygenElement* imp = static_cast<HTMLKeygenElement*>(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); const String& error(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0))); if (exec->hadException()) return JSValue::encode(jsUndefined()); imp->setCustomValidity(error); return JSValue::encode(jsUndefined());}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:17,
示例17: jsFloat64ArrayPrototypeFunctionFooEncodedJSValue JSC_HOST_CALL jsFloat64ArrayPrototypeFunctionFoo(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSFloat64Array::s_info)) return throwVMTypeError(exec); JSFloat64Array* castedThis = jsCast<JSFloat64Array*>(asObject(thisValue)); ASSERT_GC_OBJECT_INHERITS(castedThis, &JSFloat64Array::s_info); Float64Array* impl = static_cast<Float64Array*>(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createNotEnoughArgumentsError(exec)); Float32Array* array(toFloat32Array(exec->argument(0))); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->foo(array))); return JSValue::encode(result);}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:17,
示例18: jsDOMImplementationPrototypeFunctionCreateDocumentEncodedJSValue JSC_HOST_CALL jsDOMImplementationPrototypeFunctionCreateDocument(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSDOMImplementation::s_info)) return throwVMTypeError(exec); JSDOMImplementation* castedThis = static_cast<JSDOMImplementation*>(asObject(thisValue)); DOMImplementation* imp = static_cast<DOMImplementation*>(castedThis->impl()); ExceptionCode ec = 0; const String& namespaceURI = valueToStringWithNullCheck(exec, exec->argument(0)); const String& qualifiedName = valueToStringWithNullCheck(exec, exec->argument(1)); DocumentType* doctype = toDocumentType(exec->argument(2)); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->createDocument(namespaceURI, qualifiedName, doctype, ec))); setDOMException(exec, ec); return JSValue::encode(result);}
开发者ID:youtube,项目名称:h5vcc_hh,代码行数:17,
示例19: jsCSSStyleDeclarationPrototypeFunctionRemovePropertyEncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionRemoveProperty(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSCSSStyleDeclaration::s_info)) return throwVMTypeError(exec); JSCSSStyleDeclaration* castedThis = static_cast<JSCSSStyleDeclaration*>(asObject(thisValue)); CSSStyleDeclaration* imp = static_cast<CSSStyleDeclaration*>(castedThis->impl()); ExceptionCode ec = 0; const String& propertyName(ustringToString(exec->argument(0).toString(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = jsStringOrNull(exec, imp->removeProperty(propertyName, ec)); setDOMException(exec, ec); return JSValue::encode(result);}
开发者ID:13W,项目名称:phantomjs,代码行数:17,
示例20: jsNodeFilterPrototypeFunctionAcceptNodeEncodedJSValue JSC_HOST_CALL jsNodeFilterPrototypeFunctionAcceptNode(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSNodeFilter::s_info)) return throwVMTypeError(exec); JSNodeFilter* castedThis = static_cast<JSNodeFilter*>(asObject(thisValue)); NodeFilter* imp = static_cast<NodeFilter*>(castedThis->impl()); Node* n(toNode(exec->argument(0))); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = jsNumber(imp->acceptNode(exec, n)); if (exec->hadException()) return JSValue::encode(jsUndefined()); return JSValue::encode(result);}
开发者ID:13W,项目名称:phantomjs,代码行数:17,
示例21: jsTestInterfaceSupplementalNodeEncodedJSValue jsTestInterfaceSupplementalNode(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 'supplementalNode' 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(TestSupplemental::supplementalNode(&impl))); return JSValue::encode(result);}
开发者ID:boska,项目名称:webkit,代码行数:17,
示例22: jsXPathResultPrototypeFunctionSnapshotItemEncodedJSValue JSC_HOST_CALL jsXPathResultPrototypeFunctionSnapshotItem(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSXPathResult::s_info)) return throwVMTypeError(exec); JSXPathResult* castedThis = static_cast<JSXPathResult*>(asObject(thisValue)); XPathResult* imp = static_cast<XPathResult*>(castedThis->impl()); ExceptionCode ec = 0; unsigned index(exec->argument(0).toUInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->snapshotItem(index, ec))); setDOMException(exec, ec); return JSValue::encode(result);}
开发者ID:13W,项目名称:phantomjs,代码行数:17,
示例23: jsDOMNamedFlowCollectionPrototypeFunctionNamedItemEncodedJSValue JSC_HOST_CALL jsDOMNamedFlowCollectionPrototypeFunctionNamedItem(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); JSDOMNamedFlowCollection* castedThis = jsDynamicCast<JSDOMNamedFlowCollection*>(thisValue); if (!castedThis) return throwVMTypeError(exec); ASSERT_GC_OBJECT_INHERITS(castedThis, JSDOMNamedFlowCollection::info()); DOMNamedFlowCollection& impl = castedThis->impl(); if (exec->argumentCount() < 1) return throwVMError(exec, createNotEnoughArgumentsError(exec)); const String& name(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.namedItem(name))); return JSValue::encode(result);}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:17,
示例24: jsIDBDatabasePrototypeFunctionDispatchEventEncodedJSValue JSC_HOST_CALL jsIDBDatabasePrototypeFunctionDispatchEvent(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSIDBDatabase::s_info)) return throwVMTypeError(exec); JSIDBDatabase* castedThis = static_cast<JSIDBDatabase*>(asObject(thisValue)); IDBDatabase* imp = static_cast<IDBDatabase*>(castedThis->impl()); ExceptionCode ec = 0; Event* evt(toEvent(exec->argument(0))); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = jsBoolean(imp->dispatchEvent(evt, ec)); setDOMException(exec, ec); return JSValue::encode(result);}
开发者ID:13W,项目名称:phantomjs,代码行数:17,
示例25: jsSVGFEMorphologyElementPrototypeFunctionSetRadiusEncodedJSValue JSC_HOST_CALL jsSVGFEMorphologyElementPrototypeFunctionSetRadius(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); JSSVGFEMorphologyElement* castedThis = jsDynamicCast<JSSVGFEMorphologyElement*>(thisValue); if (!castedThis) return throwVMTypeError(exec); ASSERT_GC_OBJECT_INHERITS(castedThis, JSSVGFEMorphologyElement::info()); SVGFEMorphologyElement& impl = castedThis->impl(); float radiusX(exec->argument(0).toFloat(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); float radiusY(exec->argument(1).toFloat(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl.setRadius(radiusX, radiusY); return JSValue::encode(jsUndefined());}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:17,
示例26: dateProtoFuncToGMTStringEncodedJSValue JSC_HOST_CALL dateProtoFuncToGMTString(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTimeUTC(exec); if (!gregorianDateTime) return JSValue::encode(jsNontrivialString(exec, "Invalid Date")); DateConversionBuffer date; DateConversionBuffer time; formatDateUTCVariant(*gregorianDateTime, date); formatTimeUTC(*gregorianDateTime, time); return JSValue::encode(jsMakeNontrivialString(exec, date, " ", time));}
开发者ID:0omega,项目名称:platform_external_webkit,代码行数:17,
示例27: jsSVGFilterElementPrototypeFunctionSetFilterResEncodedJSValue JSC_HOST_CALL jsSVGFilterElementPrototypeFunctionSetFilterRes(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); JSSVGFilterElement* castedThis = jsDynamicCast<JSSVGFilterElement*>(thisValue); if (!castedThis) return throwVMTypeError(exec); ASSERT_GC_OBJECT_INHERITS(castedThis, JSSVGFilterElement::info()); SVGFilterElement& impl = castedThis->impl(); unsigned filterResX(toUInt32(exec, exec->argument(0), NormalConversion)); if (exec->hadException()) return JSValue::encode(jsUndefined()); unsigned filterResY(toUInt32(exec, exec->argument(1), NormalConversion)); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl.setFilterRes(filterResX, filterResY); return JSValue::encode(jsUndefined());}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:17,
示例28: jsDOMTokenListPrototypeFunctionToggleEncodedJSValue JSC_HOST_CALL jsDOMTokenListPrototypeFunctionToggle(ExecState* exec){ JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSDOMTokenList::s_info)) return throwVMTypeError(exec); JSDOMTokenList* castedThis = static_cast<JSDOMTokenList*>(asObject(thisValue)); DOMTokenList* imp = static_cast<DOMTokenList*>(castedThis->impl()); ExceptionCode ec = 0; const String& token(ustringToString(exec->argument(0).toString(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = jsBoolean(imp->toggle(token, ec)); setDOMException(exec, ec); return JSValue::encode(result);}
开发者ID:13W,项目名称:phantomjs,代码行数:17,
注:本文中的throwVMTypeError函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ throw_RTCError函数代码示例 C++ throwVMError函数代码示例 |