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))); }
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); }
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)); }
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); }