Bug 24706

Summary: Need to remove encoding() from ScriptExecutionContext
Product: WebKit Reporter: Dmitry Titov <dimich>
Component: WebKit Misc.Assignee: Dmitry Titov <dimich>
Status: RESOLVED FIXED    
Severity: Normal CC: ap
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed patch ap: review+

Description Dmitry Titov 2009-03-19 16:58:01 PDT
See bug 24150 for more info.
In short, Workers treat all URLs in them as UTF-8 and set 'default' encoding of all scripts to UTF-8, so there is no need to 'inherit' the text encoding from the 'parent context'. 

Relevant WHATWG discussions: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018874.html
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018726.html
Comment 1 Dmitry Titov 2009-03-20 15:03:48 PDT
Created attachment 28803 [details]
Proposed patch
Comment 2 Alexey Proskuryakov 2009-03-20 15:09:42 PDT
Comment on attachment 28803 [details]
Proposed patch

> +    m_cachedScript = document->docLoader()->requestScript(m_scriptURL, UTF8Encoding().name());

The name is "UTF-8", there is no need to get it in such a roundabout way.

> +            m_decoder = TextResourceDecoder::create("text/javascript", UTF8Encoding().name());

Ditto.

r=me
Comment 3 Dmitry Titov 2009-03-20 15:54:59 PDT
Replaced the name pulling with "UTF-8" and 
landed: http://trac.webkit.org/changeset/41871