本文整理汇总了C++中jsc::JSObject::toString方法的典型用法代码示例。如果您正苦于以下问题:C++ JSObject::toString方法的具体用法?C++ JSObject::toString怎么用?C++ JSObject::toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jsc::JSObject
的用法示例。
在下文中一共展示了JSObject::toString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: eventListenerHandlerBody
String eventListenerHandlerBody(Document* document, EventListener* eventListener)
{
const JSEventListener* jsListener = JSEventListener::cast(eventListener);
if (!jsListener)
return "";
JSC::JSObject* jsFunction = jsListener->jsFunction(document);
if (!jsFunction)
return "";
return ustringToString(jsFunction->toString(scriptStateFromNode(jsListener->isolatedWorld(), document)));
}
示例2: getEventListenerHandlerBody
String getEventListenerHandlerBody(ScriptExecutionContext* context, ScriptState* scriptState, EventListener* eventListener)
{
const JSEventListener* jsListener = JSEventListener::cast(eventListener);
if (!jsListener)
return "";
JSC::JSObject* jsFunction = jsListener->jsFunction(context);
if (!jsFunction)
return "";
return jsFunction->toString(scriptState);
}
示例3: eventListenerHandlerBody
String eventListenerHandlerBody(Document* document, EventListener* eventListener)
{
const JSEventListener* jsListener = JSEventListener::cast(eventListener);
if (!jsListener)
return "";
JSLock lock(SilenceAssertionsOnly);
JSC::JSObject* jsFunction = jsListener->jsFunction(document);
if (!jsFunction)
return "";
ScriptState* scriptState = scriptStateFromNode(jsListener->isolatedWorld(), document);
return ustringToString(jsFunction->toString(scriptState)->value(scriptState));
}
示例4: eventListenerHandlerBody
String eventListenerHandlerBody(Document* document, EventListener* eventListener)
{
const JSEventListener* jsListener = JSEventListener::cast(eventListener);
ASSERT(jsListener);
if (!jsListener)
return "";
JSLockHolder lock(jsListener->isolatedWorld()->globalData());
JSC::JSObject* jsFunction = jsListener->jsFunction(document);
if (!jsFunction)
return "";
ScriptState* scriptState = scriptStateFromNode(jsListener->isolatedWorld(), document);
return jsFunction->toString(scriptState)->value(scriptState);
}