[webkit-dev] maybe it's a problem in function "addToTextEncodingNameMap" in "webcore/platform/text/TextEncodingRegistry.cpp"
江南小白
zpd64 at qq.com
Sun Oct 24 20:31:04 PDT 2010
Hi All,
The following is the code:
static void addToTextEncodingNameMap(const char* alias, const char* name)
{
ASSERT(strlen(alias) <= maxEncodingNameLength);
const char* atomicName = textEncodingNameMap->get(name);
ASSERT(strcmp(alias, name) == 0 || atomicName);
if (!atomicName)
atomicName = name;
checkExistingName(alias, atomicName);
textEncodingNameMap->add(alias, atomicName);
}
Here comes a problem when i call this function like this: addToTextEncodingNameMap("myEncodingAlias", "myEncodingName"), then the assert in red is hit, Because "myEncodingName" was not early registered in textEncodingNameMap by funciton "buildBaseTextCodecMaps”, and "myEncodingAlias" is not equal with "myEncodingName". I think this does not make sense, maybe the assert in red should be removed?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20101025/675e6de4/attachment.html>
More information about the webkit-dev
mailing list