Changeset 34906 in webkit for trunk/JavaScriptCore/kjs/JSGlobalObject.h
- Timestamp:
- Jun 30, 2008, 10:45:21 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSGlobalObject.h
r34886 r34906 75 75 struct JSGlobalObjectData : public JSVariableObjectData { 76 76 JSGlobalObjectData(JSGlobalObject* globalObject, JSObject* thisValue) 77 : JSVariableObjectData(&symbolTable, 0 , 0)77 : JSVariableObjectData(&symbolTable, 0) 78 78 , globalScopeChain(globalObject, thisValue) 79 79 { … … 259 259 inline void JSGlobalObject::addStaticGlobals(GlobalPropertyInfo* globals, int count) 260 260 { 261 int numGlobals = d()->registerOffset;262 Register* registerArray = static_cast<Register*>(fastMalloc(( numGlobals+ count) * sizeof(Register)));261 size_t registerArraySize = d()->registerArraySize; 262 Register* registerArray = static_cast<Register*>(fastMalloc((registerArraySize + count) * sizeof(Register))); 263 263 if (d()->registerArray) 264 memcpy(registerArray + count, d()->registerArray , numGlobals* sizeof(Register));265 setRegisterArray(registerArray, numGlobals+ count);266 267 for (int i = 0, index = - numGlobals- 1; i < count; ++i, --index) {264 memcpy(registerArray + count, d()->registerArray.get(), registerArraySize * sizeof(Register)); 265 setRegisterArray(registerArray, registerArraySize + count); 266 267 for (int i = 0, index = -registerArraySize - 1; i < count; ++i, --index) { 268 268 GlobalPropertyInfo& global = globals[i]; 269 269 ASSERT(global.attributes & DontDelete);
Note:
See TracChangeset
for help on using the changeset viewer.