Ignore:
Timestamp:
Jul 21, 2009, 11:13:11 AM (16 years ago)
Author:
Adam Roben
Message:

Roll out r46153, r46154, and r46155

These changes were causing build failures and assertion failures on
Windows.

JavaScriptCore:

  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • runtime/JSArray.cpp:
  • runtime/StringPrototype.cpp:
  • runtime/UString.cpp:
  • runtime/UString.h:
  • wtf/FastMalloc.cpp:
  • wtf/FastMalloc.h:
  • wtf/Platform.h:
  • wtf/PossiblyNull.h: Removed.

WebCore:

  • ForwardingHeaders/wtf/PossiblyNull.h: Removed.
  • platform/graphics/cg/ImageBufferCG.cpp:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/FastMalloc.h

    r46153 r46180  
    2323
    2424#include "Platform.h"
    25 #include "PossiblyNull.h"
    2625#include <stdlib.h>
    2726#include <new>
     
    3534    void* fastRealloc(void* p, size_t n);
    3635
    37     struct TryMallocReturnValue {
    38         TryMallocReturnValue(void* data)
    39             : m_data(data)
    40         {
    41         }
    42         ~TryMallocReturnValue() { ASSERT(!m_data); }
    43         template <typename T> bool getValue(T& data) WARN_UNUSED_RETURN;
    44         template <typename T> operator PossiblyNull<T>()
    45         {
    46             T value;
    47             getValue(value);
    48             return PossiblyNull<T>(value);
    49         }
    50     private:
    51         void* m_data;
    52     };
    53    
    54     template <typename T> bool TryMallocReturnValue::getValue(T& data) {
    55         union u { void* data; T target; } res;
    56         res.data = m_data;
    57         data = res.target;
    58         bool returnValue = !!m_data;
    59         m_data = 0;
    60         return returnValue;
    61     }
    62 
    6336    // These functions return NULL if an allocation fails.
    64     TryMallocReturnValue tryFastMalloc(size_t n);
    65     TryMallocReturnValue tryFastZeroedMalloc(size_t n);
    66     TryMallocReturnValue tryFastCalloc(size_t n_elements, size_t element_size);
    67     TryMallocReturnValue tryFastRealloc(void* p, size_t n);
     37    void* tryFastMalloc(size_t n);
     38    void* tryFastZeroedMalloc(size_t n);
     39    void* tryFastCalloc(size_t n_elements, size_t element_size);
     40    void* tryFastRealloc(void* p, size_t n);
    6841
    6942    void fastFree(void* p);
Note: See TracChangeset for help on using the changeset viewer.