1. 08 Apr, 2011 1 commit
    • ggaren@apple.com's avatar
      2011-04-07 Geoffrey Garen <ggaren@apple.com> · 264f9e28
      ggaren@apple.com authored
              Reviewed by Maciej Stachowiak.
      
              Some Handle<T> cleanup
              https://bugs.webkit.org/show_bug.cgi?id=58109
      
              * bytecode/SamplingTool.h: Sorted alphabetically because that's the
              WebKit style. Added a Global.h #include that was previously missing
              but harmless.
      
              * collector/handles/Global.h:
              (JSC::Global::Global): Added a null constructor. No need for a special
              tag, and the tag is incompatible with some data structures.
              
              (JSC::Global::isHashTableDeletedValue):
              (JSC::Global::~Global):
              (JSC::Global::set):
              (JSC::Global::operator=):
              (JSC::Global::clear):
              (JSC::Global::hashTableDeletedValue): Reordered constructors to be near
              each other.
      
              (JSC::Global::setWithWriteBarrier): Renamed internalSet to
              setWithWriteBarrier for clarity, and funneled more code into using set
              and setWithWriteBarrier to reduce duplication.
      
              * collector/handles/Handle.h:
              (JSC::HandleBase::operator!):
              (JSC::HandleBase::HandleBase): Removed isEmpty(), since we already have
              boolean and ! operators.
      
              (JSC::HandleBase::slot):
              (JSC::HandleBase::setSlot):
              (JSC::Handle::Handle): Added general support for null Handles. This was
              previously outlawed by ASSERTs, but our code has grown to support and
              rely on null Handles.
              
              * collector/handles/HandleHeap.cpp:
              (JSC::HandleHeap::markWeakHandles):
              (JSC::HandleHeap::finalizeWeakHandles):
              (JSC::HandleHeap::isValidWeakNode): Migrated from isValidWeakHandle,
              and beefed this up a bit.
      
              * collector/handles/HandleHeap.h:
              (JSC::HandleHeap::globalData): Added accessor, used by some new set functions.
      
              * collector/handles/Local.h: Moved hash traits to the bottom of the file,
              since this file is about the Local class, not the traits.
      
              (JSC::::Local): Updated for removal of invalidate().
      
              (JSC::::operator): Deployed "using" to avoid a lot of this->
              template funny business.
      
              (JSC::::setWithSlotCheck): Renamed from internalSet, more specific now.
      
              * interpreter/RegisterFile.h:
              (JSC::RegisterFile::RegisterFile): Updated to use null constructor.
      
              * jit/JITStubs.cpp:
              (JSC::JITThunks::hostFunctionStub):
      
              * runtime/JSPropertyNameIterator.h:
              (JSC::Structure::setEnumerationCache):
              * runtime/Structure.h: Removed clearEnumerationCache
              because it was an unused holdover from when the enumeration cache was
              not a handle.
      
              * runtime/WeakGCMap.h:
              (JSC::WeakGCMap::set): Finish initializing our handle before putting it
              in the table. This seemed more logical, and at one point was required
              to avoid triggering an ASSERT.
      
              * runtime/WeakGCPtr.h: Inherit from Handle instead of rolling our own
              handle-like behavior, to avoid duplication.
      
              (JSC::WeakGCPtr::WeakGCPtr):
              (JSC::WeakGCPtr::~WeakGCPtr):
              (JSC::WeakGCPtr::get):
              (JSC::WeakGCPtr::clear):
              (JSC::WeakGCPtr::set):
              (JSC::WeakGCPtr::setWithWriteBarrier): Removed duplicate code and
              standardized on Handle idioms.
      2011-04-07  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Maciej Stachowiak.
      
              Some Handle<T> cleanup
              https://bugs.webkit.org/show_bug.cgi?id=58109
      
              * JSRun.h:
              * JSValueWrapper.h: #include a file that was missing before, but was
              harmlessly so until now.
      2011-04-07  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Maciej Stachowiak.
      
              Some Handle<T> cleanup
              https://bugs.webkit.org/show_bug.cgi?id=58109
      
              * bindings/js/ScriptValue.h:
              (WebCore::ScriptValue::ScriptValue): Updated for new null constructor.
              (WebCore::ScriptValue::hasNoValue): Updated for removal of isEmpty().
      2011-04-07  Geoffrey Garen  <ggaren@apple.com>
      
              Some Handle<T> cleanup
              https://bugs.webkit.org/show_bug.cgi?id=58109
      
              * WebProcess/Plugins/Netscape/NPJSObject.cpp:
              (WebKit::NPJSObject::NPJSObject): Updated for new null constructor.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      264f9e28
  2. 04 Apr, 2011 1 commit
    • oliver@apple.com's avatar
      2011-04-01 Oliver Hunt <oliver@apple.com> · 59144210
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Make StructureChain GC allocated
              https://bugs.webkit.org/show_bug.cgi?id=56695
      
              Make StructureChain GC allocated, and make the various owners
              mark it correctly.
      
              * JavaScriptCore.exp:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::dump):
              (JSC::CodeBlock::derefStructures):
              (JSC::CodeBlock::refStructures):
              (JSC::CodeBlock::markAggregate):
              * bytecode/Instruction.h:
              (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
              (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
              (JSC::PolymorphicAccessStructureList::derefStructures):
              (JSC::PolymorphicAccessStructureList::markAggregate):
              (JSC::Instruction::Instruction):
              * bytecode/StructureStubInfo.cpp:
              (JSC::StructureStubInfo::deref):
              (JSC::StructureStubInfo::markAggregate):
              * bytecode/StructureStubInfo.h:
              (JSC::StructureStubInfo::initGetByIdChain):
              (JSC::StructureStubInfo::initPutByIdTransition):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
              * collector/handles/Handle.h:
              (JSC::HandleConverter::operator->):
              (JSC::HandleConverter::operator*):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::privateExecute):
              * jit/JITOpcodes.cpp:
              (JSC::JIT::emit_op_jneq_ptr):
              * jit/JITOpcodes32_64.cpp:
              (JSC::JIT::emit_op_jneq_ptr):
              * jit/JITPropertyAccess.cpp:
              (JSC::JIT::privateCompileGetByIdChainList):
              * jit/JITPropertyAccess32_64.cpp:
              (JSC::JIT::privateCompileGetByIdChainList):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::tryCachePutByID):
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::getPolymorphicAccessStructureListSlot):
              (JSC::DEFINE_STUB_FUNCTION):
              * runtime/JSCell.h:
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::markIfNeeded):
              * runtime/JSGlobalObject.h:
              (JSC::Structure::prototypeChain):
              * runtime/JSObject.h:
              (JSC::JSObject::putDirectInternal):
              (JSC::JSObject::markChildrenDirect):
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::create):
              (JSC::JSPropertyNameIterator::get):
              (JSC::JSPropertyNameIterator::markChildren):
              * runtime/JSPropertyNameIterator.h:
              (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
              * runtime/JSZombie.cpp:
              (JSC::JSZombie::leakedZombieStructure):
              * runtime/JSZombie.h:
              * runtime/MarkStack.h:
              (JSC::MarkStack::append):
              * runtime/MarkedBlock.cpp:
              (JSC::MarkedBlock::sweep):
              * runtime/Structure.cpp:
              (JSC::Structure::addPropertyTransition):
              * runtime/Structure.h:
              (JSC::Structure::markAggregate):
              * runtime/StructureChain.cpp:
              (JSC::StructureChain::StructureChain):
              (JSC::StructureChain::~StructureChain):
              (JSC::StructureChain::markChildren):
              * runtime/StructureChain.h:
              (JSC::StructureChain::create):
              (JSC::StructureChain::createStructure):
              * runtime/WriteBarrier.h:
              (JSC::WriteBarrierBase::get):
              (JSC::WriteBarrierBase::operator*):
              (JSC::WriteBarrierBase::operator->):
      2011-04-01  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Make StructureChain GC allocated
              https://bugs.webkit.org/show_bug.cgi?id=56695
      
              Update for new Structure marking function
      
              * bindings/js/JSDOMGlobalObject.cpp:
              (WebCore::JSDOMGlobalObject::markChildren):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      59144210
  3. 15 Mar, 2011 1 commit
    • oliver@apple.com's avatar
      2011-03-15 Oliver Hunt <oliver@apple.com> · 7b1725a7
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Introduce Local<T> to allow us to start moving to precise marking of locals
              https://bugs.webkit.org/show_bug.cgi?id=56394
      
              Introduce a new handle type, Local<T> and a scoping mechanism
              LocalScope to allow us to start moving towards precise marking
              of temporaries and local variables.
      
              We also start to use the new Local<> type in the JSON stringifier
              so that we can have some coverage of their behaviour in the initial
              checkin.
      
              * GNUmakefile.am:
              * JavaScriptCore.gypi:
              * JavaScriptCore.pro:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * collector/handles/Handle.h:
              (JSC::::asObject):
              * collector/handles/HandleStack.cpp: Added.
              (JSC::HandleStack::HandleStack):
              (JSC::HandleStack::mark):
              (JSC::HandleStack::grow):
              * collector/handles/HandleStack.h: Added.
              (JSC::HandleStack::enterScope):
              (JSC::HandleStack::zapTo):
              (JSC::HandleStack::leaveScope):
              (JSC::HandleStack::push):
              * collector/handles/Local.h: Added.
              (JSC::Local::internalSet):
              (JSC::::Local):
              (JSC::::operator):
              (JSC::LocalStack::LocalStack):
              (JSC::LocalStack::peek):
              (JSC::LocalStack::pop):
              (JSC::LocalStack::push):
              (JSC::LocalStack::isEmpty):
              (JSC::LocalStack::size):
              * collector/handles/LocalScope.h: Added.
              (JSC::LocalScope::LocalScope):
              (JSC::LocalScope::~LocalScope):
              (JSC::LocalScope::release):
              * runtime/Heap.cpp:
              (JSC::Heap::markRoots):
              * runtime/Heap.h:
              (JSC::Heap::allocateLocalHandle):
              (JSC::Heap::handleStack):
              * runtime/JSCell.h:
              (JSC::JSCell::::getString):
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalData.h:
              (JSC::JSGlobalData::allocateLocalHandle):
              * runtime/JSONObject.cpp:
              (JSC::Stringifier::Stringifier):
              (JSC::Stringifier::stringify):
              (JSC::Stringifier::appendStringifiedValue):
              (JSC::Stringifier::Holder::Holder):
              (JSC::Walker::Walker):
              (JSC::Walker::walk):
              (JSC::JSONProtoFuncParse):
              (JSC::JSONProtoFuncStringify):
              (JSC::JSONStringify):
              * runtime/JSONObject.h:
              * runtime/MarkStack.h:
              (JSC::MarkStack::appendValues):
              (JSC::MarkStack::appendSlots):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7b1725a7
  4. 17 Feb, 2011 2 commits
    • commit-queue@webkit.org's avatar
      2011-02-17 Sheriff Bot <webkit.review.bot@gmail.com> · 9c797be6
      commit-queue@webkit.org authored
              Unreviewed, rolling out r78856 and r78907.
              http://trac.webkit.org/changeset/78856
              http://trac.webkit.org/changeset/78907
              https://bugs.webkit.org/show_bug.cgi?id=54705
      
              These seem to break tests on 32-bit builds. (Requested by
              aroben on #webkit).
      
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * collector/handles/Global.h:
              (JSC::Global::internalSet):
              * collector/handles/Handle.h:
              (JSC::HandleTypes::getFromSlot):
              (JSC::HandleTypes::toJSValue):
              (JSC::HandleTypes::validateUpcast):
              (JSC::HandleConverter::operator->):
              (JSC::HandleConverter::operator*):
              (JSC::Handle::Handle):
              (JSC::Handle::get):
              * runtime/JSArray.cpp:
              (JSC::JSArray::sortNumeric):
              * runtime/JSObject.h:
              (JSC::JSObject::inlineGetOwnPropertySlot):
              * runtime/SlotAccessor.h: Removed.
              * runtime/WeakGCPtr.h:
              (JSC::WeakGCPtr::get):
              (JSC::WeakGCPtr::internalSet):
              * runtime/WriteBarrier.h:
              (JSC::DeprecatedPtr::DeprecatedPtr):
              (JSC::DeprecatedPtr::get):
              (JSC::DeprecatedPtr::operator*):
              (JSC::DeprecatedPtr::operator->):
              (JSC::DeprecatedPtr::slot):
              (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
              (JSC::DeprecatedPtr::operator!):
              (JSC::WriteBarrierBase::set):
              (JSC::WriteBarrierBase::get):
              (JSC::WriteBarrierBase::operator*):
              (JSC::WriteBarrierBase::operator->):
              (JSC::WriteBarrierBase::clear):
              (JSC::WriteBarrierBase::slot):
              (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
              (JSC::WriteBarrierBase::operator!):
              (JSC::WriteBarrierBase::setWithoutWriteBarrier):
              (JSC::WriteBarrier::WriteBarrier):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78945 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c797be6
    • oliver@apple.com's avatar
      2011-02-17 Oliver Hunt <oliver@apple.com> · 4a3914d3
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Refactor WriteBarrier and DeprecatedPtr to have less code duplication.
              https://bugs.webkit.org/show_bug.cgi?id=54608
      
              Make use of the tricks used for Handle, et al to avoid duplicating all
              of the logic for DeprecatedPtr and WriteBarrier simply to support known
              vs. unknown types.
      
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * collector/handles/Global.h:
              (JSC::Global::internalSet):
              * collector/handles/Handle.h:
              (JSC::Handle::Handle):
              (JSC::Handle::get):
              * runtime/JSArray.cpp:
              (JSC::JSArray::sortNumeric):
              * runtime/JSObject.h:
              (JSC::JSObject::inlineGetOwnPropertySlot):
              * runtime/SlotAccessor.h: Added.
              (JSC::SlotTypes::getFromBaseType):
              (JSC::SlotTypes::convertToBaseType):
              (JSC::SlotTypes::getFromSlot):
              (JSC::SlotTypes::toJSValue):
              (JSC::SlotTypes::validateUpcast):
              (JSC::SlotAccessor::operator->):
              (JSC::SlotAccessor::operator*):
              * runtime/WeakGCPtr.h:
              (JSC::WeakGCPtr::get):
              (JSC::WeakGCPtr::internalSet):
              * runtime/WriteBarrier.h:
              (JSC::DeprecatedPtr::DeprecatedPtr):
              (JSC::DeprecatedPtr::get):
              (JSC::DeprecatedPtr::slot):
              (JSC::DeprecatedPtr::operator=):
              (JSC::WriteBarrierTranslator::convertToStorage):
              (JSC::WriteBarrierTranslator::convertFromStorage):
              (JSC::WriteBarrierBase::set):
              (JSC::WriteBarrierBase::get):
              (JSC::WriteBarrierBase::clear):
              (JSC::WriteBarrierBase::slot):
              (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
              (JSC::WriteBarrierBase::operator!):
              (JSC::WriteBarrierBase::setWithoutWriteBarrier):
              (JSC::WriteBarrier::WriteBarrier):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4a3914d3
  5. 15 Feb, 2011 1 commit
    • oliver@apple.com's avatar
      2011-02-14 Oliver Hunt <oliver@apple.com> · 8d85705e
      oliver@apple.com authored
              Reviewed by Gavin Barraclough and Geoff Garen.
      
              Refactor handles and weak pointers to become nicer and more automatic
              https://bugs.webkit.org/show_bug.cgi?id=54415
      
              Move to a true handle based mechanism for GC value protection.  This
              also allows us to switch to a more sensible behaviour for weak pointers
              in which weak pointers are automatically updated.
      
              This allows us to remove the old (and convoluted) that required all
              objects that may be held by a weak reference to be aware of the reference
              and manually clear them in their destructors.
      
              This also adds a few new data types to JSC that we use to efficiently
              allocate and return the underlying handle storage.
      
              This patch is largely renaming and removing now unnecessary destructors
              from objects.
      
              * API/JSClassRef.cpp:
              (OpaqueJSClass::create):
              (OpaqueJSClassContextData::OpaqueJSClassContextData):
              (OpaqueJSClass::contextData):
              (OpaqueJSClass::prototype):
              * API/JSClassRef.h:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * JavaScriptCore.exp:
              * JavaScriptCore.gypi:
              * JavaScriptCore.pro:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
              * JavaScriptCore.vcproj/WTF/WTF.vcproj:
              * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * collector/handles/Global.h: Added.
                  New Global handle type used to keep gc objects live, even if they're not
                  marked.
              (JSC::Global::Global):
              (JSC::Global::~Global):
              (JSC::Global::set):
                  We can only assign directly to a global from another global.
                  In all other cases we need the JSGlobalData to be provided
                  explicitly so we use a set function.
              (JSC::Global::operator=):
              (JSC::Global::clear):
              (JSC::Global::isHashTableDeletedValue):
              (JSC::Global::internalSet):
              * collector/handles/Handle.h: Added.
                  Root "Handle" type used for immutable handles and to provide the basic
                  APIs needed for pointer-like behaviour.
              (JSC::HandleBase::operator!):
              (JSC::HandleBase::operator UnspecifiedBoolType*):
              (JSC::HandleBase::isEmpty):
              (JSC::HandleBase::HandleBase):
              (JSC::HandleBase::slot):
              (JSC::HandleBase::invalidate):
              (JSC::HandleBase::setSlot):
              (JSC::HandleTypes::getFromSlot):
              (JSC::HandleTypes::toJSValue):
              (JSC::HandleTypes::validateUpcast):
              (JSC::HandleConverter::operator->):
              (JSC::HandleConverter::operator*):
              (JSC::Handle::Handle):
              (JSC::Handle::get):
              (JSC::Handle::wrapSlot):
              (JSC::operator==):
              (JSC::operator!=):
              * collector/handles/HandleHeap.cpp: Added.
                  New heap for global handles.
              (JSC::HandleHeap::HandleHeap):
              (JSC::HandleHeap::grow):
              (JSC::HandleHeap::markStrongHandles):
              (JSC::HandleHeap::updateAfterMark):
              (JSC::HandleHeap::clearWeakPointers):
              (JSC::HandleHeap::writeBarrier):
              * collector/handles/HandleHeap.h: Added.
              (JSC::HandleHeap::heapFor):
              (JSC::HandleHeap::toHandle):
              (JSC::HandleHeap::toNode):
              (JSC::HandleHeap::allocate):
              (JSC::HandleHeap::deallocate):
              (JSC::HandleHeap::makeWeak):
                  Convert a hard handle into weak handle that does not
                  protect the object it points to.
              (JSC::HandleHeap::makeSelfDestroying):
                  Converts a handle to a weak handle that will be returned
                  to the free list when the referenced object dies.
              (JSC::HandleHeap::Node::Node):
              (JSC::HandleHeap::Node::slot):
              (JSC::HandleHeap::Node::handleHeap):
              (JSC::HandleHeap::Node::setFinalizer):
              (JSC::HandleHeap::Node::makeWeak):
              (JSC::HandleHeap::Node::isWeak):
              (JSC::HandleHeap::Node::makeSelfDestroying):
              (JSC::HandleHeap::Node::isSelfDestroying):
              (JSC::HandleHeap::Node::finalizer):
              (JSC::HandleHeap::Node::setPrev):
              (JSC::HandleHeap::Node::prev):
              (JSC::HandleHeap::Node::setNext):
              (JSC::HandleHeap::Node::next):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::Interpreter):
              * interpreter/Interpreter.h:
              * interpreter/RegisterFile.cpp:
              (JSC::RegisterFile::globalObjectCollected):
              * interpreter/RegisterFile.h:
              (JSC::RegisterFile::RegisterFile):
              * runtime/GCHandle.cpp: Removed.
              * runtime/GCHandle.h: Removed.
              * runtime/Heap.cpp:
              (JSC::Heap::Heap):
              (JSC::Heap::destroy):
              (JSC::Heap::markRoots):
              * runtime/Heap.h:
              (JSC::Heap::allocateGlobalHandle):
              (JSC::Heap::reportExtraMemoryCost):
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalData.h:
              (JSC::JSGlobalData::allocateGlobalHandle):
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::~JSGlobalObject):
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::create):
              (JSC::JSPropertyNameIterator::~JSPropertyNameIterator):
              * runtime/JSPropertyNameIterator.h:
              (JSC::JSPropertyNameIterator::createStructure):
              (JSC::Structure::setEnumerationCache):
              (JSC::Structure::clearEnumerationCache):
              * runtime/Protect.h:
              * runtime/Structure.cpp:
              (JSC::Structure::~Structure):
              * runtime/Structure.h:
              * runtime/WeakGCPtr.h:
              (JSC::WeakGCPtrBase::get):
              (JSC::WeakGCPtrBase::clear):
              (JSC::WeakGCPtrBase::operator!):
              (JSC::WeakGCPtrBase::operator UnspecifiedBoolType*):
              (JSC::WeakGCPtrBase::~WeakGCPtrBase):
              (JSC::WeakGCPtrBase::WeakGCPtrBase):
              (JSC::WeakGCPtrBase::internalSet):
              (JSC::LazyWeakGCPtr::LazyWeakGCPtr):
              (JSC::LazyWeakGCPtr::set):
              (JSC::WeakGCPtr::WeakGCPtr):
              (JSC::WeakGCPtr::operator=):
              * runtime/WriteBarrier.h:
              * wtf/BlockStack.h: Added.
              (WTF::::BlockStack):
              (WTF::::~BlockStack):
              (WTF::::blocks):
              (WTF::::grow):
              (WTF::::shrink):
              * wtf/SentinelLinkedList.h: Added.
              (WTF::::SentinelLinkedList):
              (WTF::::begin):
              (WTF::::end):
              (WTF::::push):
              (WTF::::remove):
              * wtf/SinglyLinkedList.h: Added.
              (WTF::::SinglyLinkedList):
              (WTF::::isEmpty):
              (WTF::::push):
              (WTF::::pop):
      2011-02-14  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough and Geoff Garen.
      
              Refactor handles and weak pointers to become nicer and more automatic
              https://bugs.webkit.org/show_bug.cgi?id=54415
      
              Update to use new Global<> type
      
              * JSRun.cpp:
              (JSRun::JSRun):
              (JSRun::GlobalObject):
              * JSRun.h:
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSValueWrapper):
              * JSValueWrapper.h:
      2011-02-14  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough and Geoff Garen.
      
              Refactor handles and weak pointers to become nicer and more automatic
              https://bugs.webkit.org/show_bug.cgi?id=54415
      
              Update WebCore to use the new Global<> type rather than ProtectedJSValue
              and gc[Un]Protect.  Also update to use new WeakGCPtr APIs, and remove now
              unnecessary destructors.
      
              * ForwardingHeaders/collector/handles/Global.h: Added.
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.vcproj/copyForwardingHeaders.cmd:
              * bindings/js/JSCallbackData.h:
              (WebCore::JSCallbackData::JSCallbackData):
              * bindings/js/JSCustomVoidCallback.h:
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::forgetDOMNode):
              (WebCore::cacheDOMNodeWrapper):
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSDataGridDataSource.h:
              * bindings/js/JSEventListener.cpp:
              (WebCore::JSEventListener::JSEventListener):
              * bindings/js/JSEventListener.h:
              (WebCore::JSEventListener::setWrapper):
              * bindings/js/JSLazyEventListener.cpp:
              (WebCore::JSLazyEventListener::initializeJSFunction):
              * bindings/js/ScheduledAction.cpp:
              (WebCore::ScheduledAction::ScheduledAction):
              (WebCore::ScheduledAction::executeFunctionInContext):
              * bindings/js/ScheduledAction.h:
              (WebCore::ScheduledAction::ScheduledAction):
              * bindings/js/ScriptCachedFrameData.cpp:
              (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
              (WebCore::ScriptCachedFrameData::restore):
              * bindings/js/ScriptCachedFrameData.h:
              * bindings/js/ScriptCallStackFactory.cpp:
              (WebCore::createScriptArguments):
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::createWindowShell):
              (WebCore::ScriptController::evaluateInWorld):
              (WebCore::ScriptController::clearWindowShell):
              (WebCore::ScriptController::attachDebugger):
              * bindings/js/ScriptController.h:
              * bindings/js/ScriptFunctionCall.cpp:
              (WebCore::ScriptFunctionCall::call):
              (WebCore::ScriptCallback::call):
              * bindings/js/ScriptObject.cpp:
              (WebCore::ScriptObject::ScriptObject):
              * bindings/js/ScriptObject.h:
              * bindings/js/ScriptState.cpp:
              (WebCore::ScriptStateProtectedPtr::ScriptStateProtectedPtr):
              (WebCore::ScriptStateProtectedPtr::get):
              * bindings/js/ScriptState.h:
              * bindings/js/ScriptValue.cpp:
              (WebCore::ScriptValue::isFunction):
              (WebCore::ScriptValue::deserialize):
              * bindings/js/ScriptValue.h:
              (WebCore::ScriptValue::ScriptValue):
              (WebCore::ScriptValue::hasNoValue):
              * bindings/js/ScriptWrappable.h:
              (WebCore::ScriptWrappable::ScriptWrappable):
              (WebCore::ScriptWrappable::setWrapper):
              * bindings/js/WorkerScriptController.cpp:
              (WebCore::WorkerScriptController::WorkerScriptController):
              (WebCore::WorkerScriptController::~WorkerScriptController):
              (WebCore::WorkerScriptController::initScript):
              (WebCore::WorkerScriptController::evaluate):
              * bindings/js/WorkerScriptController.h:
              (WebCore::WorkerScriptController::workerContextWrapper):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/NP_jsobject.cpp:
              (_NPN_InvokeDefault):
              (_NPN_Invoke):
              (_NPN_Evaluate):
              (_NPN_Construct):
              * bridge/jsc/BridgeJSC.cpp:
              (JSC::Bindings::Instance::Instance):
              (JSC::Bindings::Instance::~Instance):
              (JSC::Bindings::Instance::willDestroyRuntimeObject):
              (JSC::Bindings::Instance::willInvalidateRuntimeObject):
              * bridge/jsc/BridgeJSC.h:
              * bridge/runtime_object.cpp:
              (JSC::Bindings::RuntimeObject::invalidate):
              * bridge/runtime_root.cpp:
              (JSC::Bindings::RootObject::RootObject):
              (JSC::Bindings::RootObject::invalidate):
              (JSC::Bindings::RootObject::globalObject):
              (JSC::Bindings::RootObject::updateGlobalObject):
              * bridge/runtime_root.h:
              * dom/EventListener.h:
              * dom/EventTarget.h:
              (WebCore::EventTarget::markJSEventListeners):
              * xml/XMLHttpRequest.cpp:
      
              Qt bindings courtesy of Csaba Osztrogonác
              * bridge/qt/qt_runtime.cpp:
              (JSC::Bindings::QtRuntimeConnectionMethod::call):
              (JSC::Bindings::QtConnectionObject::QtConnectionObject):
              (JSC::Bindings::QtConnectionObject::execute):
              (JSC::Bindings::QtConnectionObject::match):
              * bridge/qt/qt_runtime.h:
      2011-02-14  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough and Geoff Garen.
      
              Refactor handles and weak pointers to become nicer and more automatic
              https://bugs.webkit.org/show_bug.cgi?id=54415
      
              Update to use Global<> instead of ProtectedPtr, and refactored slightly
              to get global data to places it's needed for when we're assigning to
              Global<>s
      
              * ForwardingHeaders/collector/handles/Global.h: Added.
              * Plugins/Hosted/NetscapePluginInstanceProxy.h:
              * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
              (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::get):
              (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::idForObject):
              (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::forget):
              (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
              (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
              (WebKit::NetscapePluginInstanceProxy::evaluate):
              (WebKit::NetscapePluginInstanceProxy::invoke):
              (WebKit::NetscapePluginInstanceProxy::invokeDefault):
              (WebKit::NetscapePluginInstanceProxy::construct):
              (WebKit::NetscapePluginInstanceProxy::addValueToArray):
              * WebView/WebScriptDebugger.h:
              * WebView/WebScriptDebugger.mm:
              (WebScriptDebugger::WebScriptDebugger):
      2011-02-14  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough and Geoff Garen.
      
              Refactor handles and weak pointers to become nicer and more automatic
              https://bugs.webkit.org/show_bug.cgi?id=54415
      
              Update code to new Global<> API, and refactor to get global data to
              necessary points.
      
              * WebProcess/Plugins/Netscape/NPJSObject.cpp:
              (WebKit::NPJSObject::create):
              (WebKit::NPJSObject::NPJSObject):
              (WebKit::NPJSObject::initialize):
              (WebKit::NPJSObject::invokeDefault):
              (WebKit::NPJSObject::construct):
              (WebKit::NPJSObject::invoke):
              * WebProcess/Plugins/Netscape/NPJSObject.h:
              * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
              (WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
              (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
              (WebKit::NPRuntimeObjectMap::evaluate):
              * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
              * WebProcess/Plugins/PluginView.cpp:
              (WebKit::PluginView::windowScriptNPObject):
              (WebKit::PluginView::pluginElementNPObject):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8d85705e