~ubuntu-branches/ubuntu/lucid/webkit/lucid-security

« back to all changes in this revision

Viewing changes to JavaScriptCore/runtime/JSGlobalData.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2010-01-06 21:25:06 UTC
  • mfrom: (1.2.6 upstream) (4.3.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100106212506-gd0czn4zrwf1j19l
* New upstream release
- adds basic Content-Encoding support, thanks to soup
  (Closes: #529271)
- fixes over-advertising content types as supported by
  the media player (Closes: #559420)
* debian/control:
- updated libsoup build requirement (>= 2.28.2)
* debian/libwebkit-1.0-2.symbols:
- updated with new symbols
* debian/copyright:
- updated information since 1.1.17
* Imported patch from https://bugs.webkit.org/show_bug.cgi?id=30623
- I am shipping this patch because I believe it is correct, it is the
  way to go, it fixes a race, and it needs testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
extern JSC_CONST_HASHTABLE HashTable regExpConstructorTable;
72
72
extern JSC_CONST_HASHTABLE HashTable stringTable;
73
73
 
74
 
void JSGlobalData::ClientData::willExecute(ExecState*)
75
 
{
76
 
}
77
 
 
78
 
void JSGlobalData::ClientData::didExecute(ExecState*)
79
 
{
80
 
}
81
 
 
82
74
struct VPtrSet {
83
75
    VPtrSet();
84
76
 
93
85
    CollectorCell cell;
94
86
    void* storage = &cell;
95
87
 
96
 
    ASSERT(sizeof(JSArray) <= sizeof(CollectorCell));
 
88
    COMPILE_ASSERT(sizeof(JSArray) <= sizeof(CollectorCell), sizeof_JSArray_must_be_less_than_CollectorCell);
97
89
    JSCell* jsArray = new (storage) JSArray(JSArray::createStructure(jsNull()));
98
90
    jsArrayVPtr = jsArray->vptr();
99
91
    jsArray->~JSCell();
100
92
 
101
 
    ASSERT(sizeof(JSByteArray) <= sizeof(CollectorCell));
 
93
    COMPILE_ASSERT(sizeof(JSByteArray) <= sizeof(CollectorCell), sizeof_JSByteArray_must_be_less_than_CollectorCell);
102
94
    JSCell* jsByteArray = new (storage) JSByteArray(JSByteArray::VPtrStealingHack);
103
95
    jsByteArrayVPtr = jsByteArray->vptr();
104
96
    jsByteArray->~JSCell();
105
97
 
106
 
    ASSERT(sizeof(JSString) <= sizeof(CollectorCell));
 
98
    COMPILE_ASSERT(sizeof(JSString) <= sizeof(CollectorCell), sizeof_JSString_must_be_less_than_CollectorCell);
107
99
    JSCell* jsString = new (storage) JSString(JSString::VPtrStealingHack);
108
100
    jsStringVPtr = jsString->vptr();
109
101
    jsString->~JSCell();
110
102
 
111
 
    ASSERT(sizeof(JSFunction) <= sizeof(CollectorCell));
 
103
    COMPILE_ASSERT(sizeof(JSFunction) <= sizeof(CollectorCell), sizeof_JSFunction_must_be_less_than_CollectorCell);
112
104
    JSCell* jsFunction = new (storage) JSFunction(JSFunction::createStructure(jsNull()));
113
105
    jsFunctionVPtr = jsFunction->vptr();
114
106
    jsFunction->~JSCell();
134
126
    , propertyNameIteratorStructure(JSPropertyNameIterator::createStructure(jsNull()))
135
127
    , getterSetterStructure(GetterSetter::createStructure(jsNull()))
136
128
    , apiWrapperStructure(JSAPIValueWrapper::createStructure(jsNull()))
 
129
    , dummyMarkableCellStructure(JSCell::createDummyStructure())
137
130
#if USE(JSVALUE32)
138
131
    , numberStructure(JSNumberCell::createStructure(jsNull()))
139
132
#endif