Changeset 127202 in webkit for trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
- Timestamp:
- Aug 30, 2012, 3:50:00 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r126721 r127202 71 71 #include "RegExpObject.h" 72 72 #include "RegExpPrototype.h" 73 #include "ScopeChainMark.h"74 73 #include "StringConstructor.h" 75 74 #include "StringPrototype.h" … … 80 79 namespace JSC { 81 80 82 const ClassInfo JSGlobalObject::s_info = { "GlobalObject", & JSSegmentedVariableObject::s_info, 0, ExecState::globalObjectTable, CREATE_METHOD_TABLE(JSGlobalObject) };81 const ClassInfo JSGlobalObject::s_info = { "GlobalObject", &Base::s_info, 0, ExecState::globalObjectTable, CREATE_METHOD_TABLE(JSGlobalObject) }; 83 82 84 83 const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptExperimentsEnabled }; … … 108 107 109 108 JSGlobalObject::JSGlobalObject(JSGlobalData& globalData, Structure* structure, const GlobalObjectMethodTable* globalObjectMethodTable) 110 : JSSegmentedVariableObject(globalData, structure) 111 , m_globalScopeChain() 109 : Base(globalData, structure, this, this, 0) 112 110 , m_masqueradesAsUndefinedWatchpoint(adoptRef(new WatchpointSet(InitializedWatching))) 113 111 , m_weakRandom(Options::forceWeakRandomSeed() ? Options::forcedWeakRandomSeed() : static_cast<unsigned>(randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0))) … … 134 132 { 135 133 ASSERT(globalData().apiLock().currentThreadIsHoldingLock()); 136 137 m_globalScopeChain.set(globalData(), this, ScopeChainNode::create(0, this, &globalData(), this, thisValue)); 138 139 JSGlobalObject::globalExec()->init(0, 0, m_globalScopeChain.get(), CallFrame::noCaller(), 0, 0); 134 135 setGlobalThis(globalData(), thisValue); 136 JSGlobalObject::globalExec()->init(0, 0, this, CallFrame::noCaller(), 0, 0); 140 137 141 138 m_debugger = 0; … … 151 148 if (symbolTablePut(thisObject, exec, propertyName, value, slot.isStrictMode())) 152 149 return; 153 JSSegmentedVariableObject::put(thisObject, exec, propertyName, value, slot);150 Base::put(thisObject, exec, propertyName, value, slot); 154 151 } 155 152 … … 164 161 JSValue valueBefore = thisObject->getDirect(exec->globalData(), propertyName); 165 162 PutPropertySlot slot; 166 JSSegmentedVariableObject::put(thisObject, exec, propertyName, value, slot);163 Base::put(thisObject, exec, propertyName, value, slot); 167 164 if (!valueBefore) { 168 165 JSValue valueAfter = thisObject->getDirect(exec->globalData(), propertyName); … … 346 343 COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); 347 344 ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren()); 348 JSSegmentedVariableObject::visitChildren(thisObject, visitor); 349 350 visitor.append(&thisObject->m_globalScopeChain); 345 Base::visitChildren(thisObject, visitor); 346 351 347 visitor.append(&thisObject->m_methodCallDummy); 352 348 … … 419 415 { 420 416 JSGlobalObject* thisObject = jsCast<JSGlobalObject*>(cell); 421 if (getStaticFunctionSlot< JSSegmentedVariableObject>(exec, ExecState::globalObjectTable(exec), thisObject, propertyName, slot))417 if (getStaticFunctionSlot<Base>(exec, ExecState::globalObjectTable(exec), thisObject, propertyName, slot)) 422 418 return true; 423 419 return symbolTableGet(thisObject, propertyName, slot); … … 427 423 { 428 424 JSGlobalObject* thisObject = jsCast<JSGlobalObject*>(object); 429 if (getStaticFunctionDescriptor< JSSegmentedVariableObject>(exec, ExecState::globalObjectTable(exec), thisObject, propertyName, descriptor))425 if (getStaticFunctionDescriptor<Base>(exec, ExecState::globalObjectTable(exec), thisObject, propertyName, descriptor)) 430 426 return true; 431 427 return symbolTableGet(thisObject, propertyName, descriptor);
Note:
See TracChangeset
for help on using the changeset viewer.