[webkit-reviews] review granted: [Bug 27515] Implement AbstractWorker::dispatchScriptErrorEvent by generating an ErrorEvent. : [Attachment 33211] Proposed Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 21 17:25:04 PDT 2009
David Levin <levin at chromium.org> has granted Jian Li <jianli at chromium.org>'s
request for review:
Bug 27515: Implement AbstractWorker::dispatchScriptErrorEvent by generating an
ErrorEvent.
https://bugs.webkit.org/show_bug.cgi?id=27515
Attachment 33211: Proposed Patch
https://bugs.webkit.org/attachment.cgi?id=33211&action=review
------- Additional Comments from David Levin <levin at chromium.org>
Please do a variable name change below before landing.
> +void AbstractWorker::dispatchScriptErrorEvent(const String& message, const
String& sourceURL, int lineNumber)
> {
> + RefPtr<ErrorEvent> evt = ErrorEvent::create(message, sourceURL,
static_cast<unsigned>(lineNumber));
Use full words, except in the rare case where an abbreviation would be more
canonical and easier to understand.
s/evt/event/
> + if (m_onErrorListener) {
> + evt->setTarget(this);
> + evt->setCurrentTarget(this);
> + m_onErrorListener->handleEvent(evt.get(), true);
> + }
> +
> + ExceptionCode ec = 0;
> + dispatchEvent(evt.release(), ec);
> + ASSERT(!ec);
> }
>
> } // namespace WebCore
More information about the webkit-reviews
mailing list