Bug 22097 - Expose MessageEvent constructor on WorkerContext
Summary: Expose MessageEvent constructor on WorkerContext
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-05 23:48 PST by Alexey Proskuryakov
Modified: 2008-11-06 21:55 PST (History)
1 user (show)

See Also:


Attachments
proposed patch (3.13 KB, patch)
2008-11-05 23:49 PST, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2008-11-05 23:48:09 PST
Since MessageEvent is used in workers, we should expose its constructor.
Comment 1 Alexey Proskuryakov 2008-11-05 23:49:37 PST
Created attachment 24936 [details]
proposed patch
Comment 2 Darin Adler 2008-11-06 09:29:01 PST
Comment on attachment 24936 [details]
proposed patch

> +void setJSWorkerContextMessageEvent(ExecState*, JSObject*, JSValue*)
> +{
> +    ASSERT_NOT_REACHED();
> +}

Why this instead of ReadOnly?

r=me
Comment 3 Alexey Proskuryakov 2008-11-06 09:41:07 PST
(In reply to comment #2)
> > +    ASSERT_NOT_REACHED();
> Why this instead of ReadOnly?

I don't know - like other setters, I modeled this after what JSDOMWindowBase does - it doesn't make the constructors read-only, but overrides put() to have special behavior for those. I only have a FIXME for this in setJSWorkerContextMessageChannel now:

    // FIXME: Do we need to override put for global constructors, like JSDOMWindowBase does?

Comment 4 Alexey Proskuryakov 2008-11-06 21:55:06 PST
Committed revision 38212.