2011-02-06 Ryosuke Niwa <rniwa@webkit.org>
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Feb 2011 05:01:30 +0000 (05:01 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Feb 2011 05:01:30 +0000 (05:01 +0000)
commita7dd30af4340fb1dd6ad8649873a4e1c7ac9b6c8
tree01ae6d45a4761d1ab5bf4885941b1a2e0d17fbfe
parentd1a6608eeeeb56657e54f568767c6f21705b58b6
2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Darin Adler.

        OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
        https://bugs.webkit.org/show_bug.cgi?id=52867

        * DumpRenderTree/chromium/ImageDiff.cpp:
        (Image::craeteFromStdin): Call adoptArrayPtr.
2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Darin Adler.

        OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
        https://bugs.webkit.org/show_bug.cgi?id=52867

        Removed LOOSE_OWN_ARRAY_PTR and OwnArrayPtr<T>::set. Replaced all calls to OwnArrayPtr::set
        and loose instantiation of OwnArrayPtr by calls to operator= and adoptArrayPtr. Also removed
        OwnArrayPtrCommon.h since PassOwnArrayPtr.h needs to include OwnArrayPtr.h and there is
        no point in putting deleteOwnedArrayPtr into a separate header.

        Note: if this patch breaks build, the code is either instiantiating OwnArrayPtr
        without calling adoptArrayPtr or calling set on ArrayOwnPtr instead of operator=.

        No tests are added since this is a refactoring.

        * API/JSStringRefCF.cpp:
        (JSStringCreateWithCFString): Calls adoptArrayPtr.
        * GNUmakefile.am: Removed OwnArrayPtrCommon.h
        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
        * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
        * runtime/Arguments.cpp:
        (JSC::Arguments::deleteProperty): Calls adoptArrayPtr.
        * runtime/Arguments.h:
        (JSC::Arguments::copyRegisters): Ditto.
        * runtime/JSPropertyNameIterator.cpp:
        (JSC::JSPropertyNameIterator::JSPropertyNameIterator): Ditto.
        * runtime/JSVariableObject.h:
        (JSC::JSVariableObject::setRegisters): Calls operator= instead of set.
        * runtime/StructureChain.cpp:
        (JSC::StructureChain::StructureChain): Ditto.
        * wtf/CMakeLists.txt:
        * wtf/DateMath.h:
        (JSC::GregorianDateTime::GregorianDateTime): No longer instnatiates OwnArrayPtr
        with a null pointer.
        * wtf/OwnArrayPtr.h:
        * wtf/OwnArrayPtrCommon.h: Removed.
        * wtf/PassOwnArrayPtr.h: No longer includes OwnArrayCommon.h
        (WTF::deleteOwnedArrayPtr): Moved from OwnArrayPtrCommon.h
2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Darin Adler.

        OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
        https://bugs.webkit.org/show_bug.cgi?id=52867

        * ForwardingHeaders/wtf/OwnArrayPtrCommon.h: Removed.
2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Darin Adler.

        OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
        https://bugs.webkit.org/show_bug.cgi?id=52867

        * WebHistory.cpp:
        (WebHistory::orderedLastVisitedDays): Calls adoptArrayPtr.
        * WebPreferences.cpp:
        (WebPreferences::copyWebKitPreferencesToCFPreferences): Ditto.
2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Darin Adler.

        OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
        https://bugs.webkit.org/show_bug.cgi?id=52867

        * ForwardingHeaders/wtf/OwnArrayPtrCommon.h: Removed.
        * bindings/v8/NPV8Object.cpp:
        (WebCore::createValueListFromVariantArgs): Returns PassOwnArrayPtr<v8::Handle<v8::Value>> instead of
        v8::Handle<v8::Value>*.
        (_NPN_Invoke): Calls createValueListFromVariantArgs.
        (_NPN_InvokeDefault): createValueListFromVariantArgs.
        (_NPN_Construct): createValueListFromVariantArgs.
        * bindings/v8/ScriptFunctionCall.cpp:
        (WebCore::ScriptFunctionCall::call): Calls adoptArrayPtr.
        (WebCore::ScriptFunctionCall::construct): Ditto.
        (WebCore::ScriptCallback::call):
        * bindings/v8/V8DOMWindowShell.cpp:
        (WebCore::V8DOMWindowShell::createNewContext): Ditto.
        * bindings/v8/V8NPObject.cpp:
        (WebCore::npObjectInvokeImpl): Ditto
        * bindings/v8/V8NodeFilterCondition.cpp:
        (WebCore::V8NodeFilterCondition::acceptNode): Ditto,
        * html/HTMLAreaElement.cpp:
        (WebCore::HTMLAreaElement::parseMappedAttribute): Calls newCoordsArray.
        * html/HTMLFrameSetElement.cpp:
        (WebCore::HTMLFrameSetElement::parseMappedAttribute): Calls newLengthArray.
        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::getAttachedShaders): Calls adoptArraYptr.
        (WebCore::WebGLRenderingContext::simulateVertexAttrib0): Ditto.
        (WebCore::WebGLRenderingContext::LRUImageBufferCache::LRUImageBufferCache): Dito.
        * platform/Length.cpp:
        (WebCore::newCoordsArray): Returns PassOwnArrayPtr<Length> instead of Length*.
        (WebCore::newLengthArray): Returns PassOwnArrayPtr<Length> instead of Length*.
        * platform/Length.h: Prototype changes.
        * platform/graphics/ANGLEWebKitBridge.cpp:
        (WebCore::ANGLEWebKitBridge::validateShaderSource): Calls adoptArrayPtr.
        * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
        (WebCore::getDirtyRects): Ditto.
        * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
        (WebCore::ComplexTextController::getNormalizedTextRun): Ditto.
        * platform/graphics/chromium/HarfbuzzSkia.cpp:
        (WebCore::glyphsToAdvances): Ditto.
        (WebCore::canRender): Ditto.
        * platform/graphics/gpu/Texture.cpp:
        (WebCore::Texture::updateSubRect): Ditto.
        * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
        (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): Ditto.
        * platform/graphics/skia/PlatformContextSkia.cpp:
        (WebCore::PlatformContextSkia::readbackHardwareToSoftware): Ditto.
        * platform/graphics/wince/SharedBitmap.cpp:
        (WebCore::SharedBitmap::to16bit): Ditto.
        * platform/win/ContextMenuWin.cpp:
        (WebCore::ContextMenu::getContextMenuItems): Ditto.
        * platform/win/LoggingWin.cpp:
        (WebCore::initializeWithUserDefault): Ditto.
        * plugins/win/PluginPackageWin.cpp:
        (WebCore::PluginPackage::fetchInfo): Ditto.
2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Darin Adler.

        OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
        https://bugs.webkit.org/show_bug.cgi?id=52867

        * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
        (WebKit::NetscapePluginModule::getPluginInfo): Calls adoptArrayPtr.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77785 268f45cc-cd09-0410-ab3c-d52691b4dbfc
47 files changed:
Source/JavaScriptCore/API/JSStringRefCF.cpp
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/GNUmakefile.am
Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/runtime/Arguments.cpp
Source/JavaScriptCore/runtime/Arguments.h
Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp
Source/JavaScriptCore/runtime/JSVariableObject.h
Source/JavaScriptCore/runtime/StructureChain.cpp
Source/JavaScriptCore/wtf/CMakeLists.txt
Source/JavaScriptCore/wtf/DateMath.h
Source/JavaScriptCore/wtf/OwnArrayPtr.h
Source/JavaScriptCore/wtf/OwnArrayPtrCommon.h [deleted file]
Source/JavaScriptCore/wtf/PassOwnArrayPtr.h
Source/JavaScriptGlue/ChangeLog
Source/JavaScriptGlue/ForwardingHeaders/wtf/OwnArrayPtrCommon.h [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/ForwardingHeaders/wtf/OwnArrayPtrCommon.h [deleted file]
Source/WebCore/bindings/v8/NPV8Object.cpp
Source/WebCore/bindings/v8/ScriptFunctionCall.cpp
Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
Source/WebCore/bindings/v8/V8NPObject.cpp
Source/WebCore/bindings/v8/V8NodeFilterCondition.cpp
Source/WebCore/html/HTMLAreaElement.cpp
Source/WebCore/html/HTMLFrameSetElement.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/platform/Length.cpp
Source/WebCore/platform/Length.h
Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp
Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.cpp
Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.cpp
Source/WebCore/platform/graphics/chromium/HarfbuzzSkia.cpp
Source/WebCore/platform/graphics/gpu/Texture.cpp
Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
Source/WebCore/platform/graphics/wince/SharedBitmap.cpp
Source/WebCore/platform/win/ContextMenuWin.cpp
Source/WebCore/platform/win/LoggingWin.cpp
Source/WebCore/plugins/win/PluginPackageWin.cpp
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebHistory.cpp
Source/WebKit/win/WebPreferences.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp
Tools/ChangeLog
Tools/DumpRenderTree/chromium/ImageDiff.cpp