Bug 24706 - Need to remove encoding() from ScriptExecutionContext
Summary: Need to remove encoding() from ScriptExecutionContext
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Dmitry Titov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-19 16:58 PDT by Dmitry Titov
Modified: 2009-03-20 15:54 PDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (23.16 KB, patch)
2009-03-20 15:03 PDT, Dmitry Titov
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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