Bug 27516

Summary: Add onerror to WorkerContext.
Product: WebKit Reporter: Jian Li <jianli>
Component: WebCore JavaScriptAssignee: Jian Li <jianli>
Status: RESOLVED FIXED    
Severity: Normal CC: levin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 27518    
Attachments:
Description Flags
Proposed Patch
levin: review-
Proposed Patch levin: review+

Jian Li
Reported 2009-07-21 13:54:01 PDT
Add onerror to WorkerContext.
Attachments
Proposed Patch (2.88 KB, patch)
2009-07-21 14:11 PDT, Jian Li
levin: review-
Proposed Patch (2.64 KB, patch)
2009-07-21 15:27 PDT, Jian Li
levin: review+
Jian Li
Comment 1 2009-07-21 14:11:40 PDT
Created attachment 33214 [details] Proposed Patch
Jian Li
Comment 2 2009-07-21 14:45:32 PDT
This is to adhere to the latest Web Worker spec (http://www.whatwg.org/specs/web-workers/current-work/#workerglobalscope): interface WorkerGlobalScope { ... attribute Function onerror; }; I will have other patches that will trigger onerror.
David Levin
Comment 3 2009-07-21 15:12:11 PDT
Comment on attachment 33214 [details] Proposed Patch Just a few things to clean up. > diff --git a/WebCore/workers/WorkerContext.h b/WebCore/workers/WorkerContext.h > + RefPtr<EventListener> m_onErrorListener; Should be "m_onerrorListener" because onerror seems to consistently treated as one word. > diff --git a/WebCore/workers/WorkerContext.idl b/WebCore/workers/WorkerContext.idl > #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT > - attribute [Replaceable] WorkerContext self; > + attribute [Replaceable] WorkerContext self; Don't unindent these. The idl formatting leaves room for "readonly " when it isn't present which is why these are indented to this level. > #endif > - attribute [Replaceable] WorkerLocation location; > + attribute [Replaceable] WorkerLocation location; Same unindenting comment. > void close(); > - // attribute EventListener onerror; > + attribute EventListener onerror; Just uncomment but indent correctly.
Jian Li
Comment 4 2009-07-21 15:27:22 PDT
Created attachment 33218 [details] Proposed Patch
Note You need to log in before you can comment on or make changes to this bug.