source: webkit/trunk/JavaScriptCore/wtf/Locker.h@ 45891

Last change on this file since 45891 was 45891, checked in by [email protected], 16 years ago

JavaScriptCore:

2009-07-14 Zoltan Horvath <[email protected]>

Reviewed by Darin Adler.

Change all Noncopyable inheriting visibility to public.
https://bugs.webkit.org/show_bug.cgi?id=27225

Change all Noncopyable inheriting visibility to public because
it is needed to the custom allocation framework (bug #20422).

  • bytecode/SamplingTool.h:
  • bytecompiler/RegisterID.h:
  • interpreter/CachedCall.h:
  • interpreter/RegisterFile.h:
  • parser/Lexer.h:
  • parser/Parser.h:
  • runtime/ArgList.h:
  • runtime/BatchedTransitionOptimizer.h:
  • runtime/Collector.h:
  • runtime/CommonIdentifiers.h:
  • runtime/JSCell.h:
  • runtime/JSGlobalObject.h:
  • runtime/JSLock.h:
  • runtime/JSONObject.cpp:
  • runtime/SmallStrings.cpp:
  • runtime/SmallStrings.h:
  • wtf/CrossThreadRefCounted.h:
  • wtf/GOwnPtr.h:
  • wtf/Locker.h:
  • wtf/MessageQueue.h:
  • wtf/OwnArrayPtr.h:
  • wtf/OwnFastMallocPtr.h:
  • wtf/OwnPtr.h:
  • wtf/RefCounted.h:
  • wtf/ThreadSpecific.h:
  • wtf/Threading.h:
  • wtf/Vector.h:
  • wtf/unicode/Collator.h:

WebCore:

2009-07-14 Zoltan Horvath <[email protected]>

Reviewed by Darin Adler.

Change all Noncopyable inheriting visibility to public.
https://bugs.webkit.org/show_bug.cgi?id=27225

Change all Noncopyable inheriting visibility to public because
it is needed to the custom allocation framework (bug #20422).

  • bindings/js/GCController.h:
  • bindings/js/WorkerScriptController.h:
  • bindings/v8/V8DOMMap.cpp: (WebCore::):
  • bridge/runtime.h:
  • css/CSSSelector.h:
  • css/CSSSelectorList.h:
  • css/CSSStyleSelector.h:
  • dom/ClassNames.h:
  • dom/MessagePortChannel.h:
  • dom/XMLTokenizerLibxml2.cpp:
  • dom/XMLTokenizerScope.h:
  • editing/ReplaceSelectionCommand.cpp:
  • editing/SelectionController.h:
  • editing/TextIterator.cpp:
  • history/PageCache.h:
  • html/CanvasRenderingContext2D.h:
  • html/HTMLParser.h:
  • html/HTMLParserQuirks.h:
  • html/PreloadScanner.h:
  • loader/Cache.h:
  • loader/CrossOriginPreflightResultCache.h:
  • loader/FrameLoader.h:
  • loader/ProgressTracker.h:
  • loader/ThreadableLoader.h:
  • loader/appcache/ApplicationCacheGroup.h:
  • loader/archive/ArchiveResourceCollection.h:
  • loader/icon/IconDatabase.h:
  • loader/icon/IconLoader.h:
  • loader/icon/PageURLRecord.h:
  • loader/loader.h:
  • page/ContextMenuController.h:
  • page/EventHandler.h:
  • page/FrameTree.h:
  • page/Page.h:
  • page/PageGroup.h:
  • page/PageGroupLoadDeferrer.h:
  • page/mac/EventHandlerMac.mm:
  • platform/AutodrainedPool.h:
  • platform/ContextMenu.h:
  • platform/EventLoop.h:
  • platform/HostWindow.h:
  • platform/Pasteboard.h:
  • platform/PurgeableBuffer.h:
  • platform/RunLoopTimer.h:
  • platform/ThreadGlobalData.h:
  • platform/ThreadTimers.h:
  • platform/Timer.h:
  • platform/TreeShared.h:
  • platform/graphics/FontData.h:
  • platform/graphics/GlyphWidthMap.h:
  • platform/graphics/GraphicsContext.h:
  • platform/graphics/ImageBuffer.h:
  • platform/graphics/ImageSource.h:
  • platform/graphics/MediaPlayer.h:
  • platform/graphics/skia/GraphicsContextPlatformPrivate.h:
  • platform/graphics/skia/PlatformContextSkia.h:
  • platform/graphics/win/QTMovieWin.cpp:
  • platform/mac/LocalCurrentGraphicsContext.h:
  • platform/network/FormDataBuilder.h:
  • platform/network/ResourceHandleInternal.h:
  • platform/network/soup/ResourceHandleSoup.cpp:
  • platform/text/StringBuffer.h:
  • platform/text/TextCodec.h:
  • platform/win/WindowMessageBroadcaster.h:
  • rendering/CounterNode.h:
  • rendering/LayoutState.h:
  • rendering/RenderFrameSet.h:
  • rendering/RenderView.h:
  • rendering/TransformState.h:
  • svg/SVGAnimatedProperty.h:
  • svg/SynchronizableTypeWrapper.h:
  • workers/WorkerMessagingProxy.h:
  • workers/WorkerRunLoop.cpp:
  • xml/XPathExpressionNode.h:
  • xml/XPathParser.h:
  • xml/XPathPredicate.h:
  • xml/XPathStep.h:

WebKit/gtk:

2009-07-14 Zoltan Horvath <[email protected]>

Reviewed by Darin Adler.

Change all Noncopyable inheriting visibility to public.
https://bugs.webkit.org/show_bug.cgi?id=27225

Change all Noncopyable inheriting visibility to public because
it is needed to the custom allocation framework (bug #20422).

  • webkit/webkitdownload.cpp:

WebKit/win:

2009-07-14 Zoltan Horvath <[email protected]>

Reviewed by Darin Adler.

Change all Noncopyable inheriting visibility to public.
https://bugs.webkit.org/show_bug.cgi?id=27225

Change all Noncopyable inheriting visibility to public because
it is needed to the custom allocation framework (bug #20422).

  • COMEnumVariant.h:
  • WebDatabaseManager.cpp:
  • WebInspector.h:
  • WebLocalizableStrings.cpp:
File size: 1.8 KB
Line 
1/*
2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
14 * its contributors may be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28#ifndef Locker_h
29#define Locker_h
30
31#include <wtf/Noncopyable.h>
32
33namespace WTF {
34
35template <typename T> class Locker : public Noncopyable {
36public:
37 Locker(T& lockable) : m_lockable(lockable) { m_lockable.lock(); }
38 ~Locker() { m_lockable.unlock(); }
39private:
40 T& m_lockable;
41};
42
43}
44
45using WTF::Locker;
46
47#endif
Note: See TracBrowser for help on using the repository browser.