void WebDebugListenerImpl::sourceParsed(ExecState* execState, const SourceCode& source, int errorLine, const UString& errorMsg) { if (m_listener && !m_inDebug) { m_inDebug = true; WebCore::String coreSourceURL = WebCore::ustringToString(source.provider()->url()); WebCore::Frame *frame = static_cast<WebCore::JSDOMWindow*>(execState->lexicalGlobalObject())->impl()->frame(); if (!(coreSourceURL.isNull() || coreSourceURL.isEmpty())) { WebCore::KURL sourceURL(WebCore::ParsedURLString, coreSourceURL); WebCore::KURL mappedURL; if(WebCore::FrameLoaderClientApollo::mapFrameUrl(frame, sourceURL, &mappedURL)) { coreSourceURL = mappedURL.string(); } } WebCore::String coreErrorMsg = WebCore::ustringToString(errorMsg); WebCore::String coreSource(source.data(), source.length()); m_listener->m_pVTable->sourceParsed(m_listener, source.provider()->asID(), coreSourceURL.webString(), coreSource.webString(), source.firstLine(), errorLine, coreErrorMsg.webString()); m_inDebug = false; } }