Ignore:
Timestamp:
Jul 5, 2009, 8:45:31 AM (16 years ago)
Author:
Simon Hausmann
Message:

JavaScriptCore:

2009-07-05 Lars Knoll <[email protected]>

Reviewed by Maciej Stachowiak.

https://bugs.webkit.org/show_bug.cgi?id=26843

Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.

The Metrowerks compiler on the Symbian platform moves the globally
defined Hashtables into read-only memory, despite one of the members
being mutable. This causes crashes at run-time due to write access to
read-only memory.

Avoid the use of const with this compiler by introducing the
JSC_CONST_HASHTABLE macro.

Based on idea by Norbert Leser.

  • runtime/Lookup.h: Define JSC_CONST_HASHTABLE as const for !WINSCW.
  • create_hash_table: Use JSC_CONST_HASHTABLE for hashtables.
  • runtime/JSGlobalData.cpp: Import various global hashtables via the macro.

WebCore:

2009-07-05 Lars Knoll <[email protected]>

Reviewed by Maciej Stachowiak.

https://bugs.webkit.org/show_bug.cgi?id=26843

Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.

The Metrowerks compiler on the Symbian platform moves the globally
defined Hashtables into read-only memory, despite one of the members
being mutable. This causes crashes at run-time due to write access to
read-only memory.

Avoid the use of const with this compiler by introducing the
JSC_CONST_HASHTABLE macro.

Based on idea by Norbert Leser.

  • bindings/scripts/CodeGeneratorJS.pm: Use JSC_CONST_HASHTABLE for hash tables define in the bindings.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Lookup.h

    r45269 r45553  
    3030#include <wtf/Assertions.h>
    3131
     32// Bug #26843: Work around Metrowerks compiler bug
     33#if COMPILER(WINSCW)
     34#define JSC_CONST_HASHTABLE
     35#else
     36#define JSC_CONST_HASHTABLE const
     37#endif
     38
    3239namespace JSC {
    3340
Note: See TracChangeset for help on using the changeset viewer.